alexa_media_player icon indicating copy to clipboard operation
alexa_media_player copied to clipboard

Echo and Echo Plus Temperature Sensor in Celsius Only

Open jstinesnc opened this issue 2 years ago • 15 comments

I recently upgraded to 2022.7.2 of Home Assistant and upgraded to the latest version of Alexa Media Player. I am in the USA and have my temp preference set as Fahrenheit Pounds Imperial in Home Assistant under Settings>System>General. Previously, my echo temperature sensors displayed in degree Fahrenheit, but now they only display in Celsius.

Under Entity states the sensor has the following attributes: unit_of_measurement: °C friendly_name: Dining Room Echo Plus Temperature

I tried customizing another sensor to see if it would display properly by manually adding the following:

sensor.utility_closet_echo_plus_temperature: device_class: temperature unit_of_measurement: °F state_class: measurement

This did not change the value to Fahrenheit, but only changed the degree icon to °F.

I've also tried adding only the following customization (removing the unit of measure):

sensor.utility_closet_echo_plus_temperature: device_class: temperature state_class: measurement

This did not provide the ability to change the sensor from C to F.

Other temperature sensors that are displaying properly show a dropdown setting for Unit of Measurement when clicking the gear icon for settings on the GUI dashboard. Alexa Media Player Echo Temperature Sensors don't display this dropdown.

image

image

This could be a bug in the new HA release, but I wanted to run it by you if perhaps something needs to be addressed in how the temperate sensor is created/defined through Alexa Media Player. Thanks.

jstinesnc avatar Jul 09 '22 17:07 jstinesnc

Could it possibly need native_unit_of_measurement to be set to °C and device_class set to temperature?

https://developers.home-assistant.io/docs/core/entity/sensor/#properties

jstinesnc avatar Jul 09 '22 17:07 jstinesnc

This seems to have started with a recent update to the Media Player, as I noticed this issue several days before upgrading HA to 2022.7.x

PJW58 avatar Jul 10 '22 20:07 PJW58

I can confirm and reproduce this issue as well.

rjdalga avatar Jul 16 '22 20:07 rjdalga

Could it possibly need native_unit_of_measurement to be set to °C and device_class set to temperature?

https://developers.home-assistant.io/docs/core/entity/sensor/#properties

Yes, it's probably that. Happy to take a PR when someone submits it. I don't have any temperature sensors.

alandtse avatar Jul 18 '22 23:07 alandtse

Can confirm same thing here. All other temperature sensors show F while Alexa's show C. Also confirm it started with a recent update, I think 4.x in May.

driven4jed avatar Jul 19 '22 22:07 driven4jed

Can confirm same thing here. All other temperature sensors show F while Alexa's show C. Also confirm it started with a recent update, I think 4.x in May.

i can confirm also it is driving me nuts hope there is a fix soon

techguy930 avatar Jul 25 '22 19:07 techguy930

+1

rhoskins61 avatar Aug 04 '22 11:08 rhoskins61

Created PR https://github.com/custom-components/alexa_media_player/pull/1682 to fix this. @alandtse - Please review and let me know if you need anything else to be done.

kdvlr avatar Aug 05 '22 04:08 kdvlr

Fix is in dev now. I can't test it but you can load it in HACS or wait till the next release (after it's confirmed). Thanks @kdvlr

alandtse avatar Aug 06 '22 21:08 alandtse

For reference, you can download the dev branch by selecting "dev" from the dropdown. Please test and let me know if you have any errors.

image

kdvlr avatar Aug 06 '22 22:08 kdvlr

I am happy to test this, but I can't find where you are seeing this "Show beta versions" option window. Is the only way to see this option to delete the existing integration and then re-download Alexa Media Player in HACS?

jstinesnc avatar Aug 07 '22 02:08 jstinesnc

Nevermind. I found it under re-download. Thanks.

jstinesnc avatar Aug 07 '22 03:08 jstinesnc

Not sure if related, but am now getting random Alexa Media re-authentication required. Going to roll back and see what happens.

rhoskins61 avatar Aug 08 '22 12:08 rhoskins61

It shouldn’t. The code does not make any changes in any authentication flow. @jstinesnc - were you able to test ?

kdvlr avatar Aug 08 '22 16:08 kdvlr

OK, thanks.. I did test and the C > F works. TY for that fix!

rhoskins61 avatar Aug 08 '22 17:08 rhoskins61

Works great... Thank you*2!

driven4jed avatar Aug 16 '22 19:08 driven4jed