Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F Temps Not Working #150

Closed
JeffSteinbok opened this issue May 2, 2023 · 3 comments
Closed

F Temps Not Working #150

JeffSteinbok opened this issue May 2, 2023 · 3 comments
Assignees
Labels
bug Something isn't working T-Shirt-Size: S

Comments

@JeffSteinbok
Copy link

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
Copy link
Owner

cgiesche commented May 2, 2023

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
Copy link
Author

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
Copy link
Owner

cgiesche commented May 2, 2023

Ah. Easy fix.

@cgiesche cgiesche self-assigned this May 2, 2023
@cgiesche cgiesche added bug Something isn't working T-Shirt-Size: S labels May 2, 2023
cgiesche added a commit that referenced this issue May 30, 2023
Fixed #150: Wrong Fahrenheit to Celsius conversion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working T-Shirt-Size: S
Projects
None yet
Development

No branches or pull requests

2 participants