cgiesche / streamdeck-homeassistant

Control your Home Assistant devices from StreamDeck
MIT License
805 stars 39 forks source link

F Temps Not Working #150

Closed JeffSteinbok closed 1 year ago

JeffSteinbok commented 1 year ago

Temperatures in °F don't seem to show the right color. Looks like this logic isn't quite working, even though in HA my sensors are setup that way.

if (attributes.unit_of_measurement === "°F") { nonRetardedTemperature = nonRetardedTemperature / 1.8 }

state_class: measurement unit_of_measurement: °F device_class: temperature friendly_name: Outdoor Temperature

cgiesche commented 1 year ago

Oops, what an unfriendly variable name - especially because °F is just another scale. Sorry for that.

Does the plugin display the correct value in °F? If yes, which value does it show in which color?

JeffSteinbok commented 1 year ago

I don't mind the naming. :)

ACTUALLY, the bug is just the 1.8. My living room is 70F, and by your math, 38C, which is wrong. What you want:

C = 5/9 * (F-32)

cgiesche commented 1 year ago

Ah. Easy fix.