rsnodgrass / hass-poolmath

Pool Math for Home Assistant
Other
30 stars 9 forks source link

F instead of C #23

Closed CrallH closed 2 months ago

CrallH commented 1 year ago

Hi! My temp sensor displays as F in home assistant but as C in poolmath, is there a way i can change that in the component files? Screenshot_2023-05-21-10-40-11-866_com android chrome Screenshot_2023-05-21-10-39-19-870_io homeassistant companion android

rsnodgrass commented 2 months ago

I believe you can change units in Home Assistant itself.

CrallH commented 2 months ago

I believe you can change units in Home Assistant itself.

Yes that would be possible if the device_class is temperature, but it´s not, the sensors do not have any device class, so in that case i need to create a template sensor just to give it a device class and the correct unit.

image

CrallH commented 2 months ago

I think i might have found a bug in poolmath app. All data is displayd in C in my app and in the JSON, but the "waterTempUnitDefault" was 0. I unchecked the log temperature in the app and saved then reactivated it again. Now it´s "waterTempUnitDefault": 1, I saw that you used that in the code to set UnitOfTemperature.CELSIUS.

CrallH commented 2 months ago

after finding the issue in the JSON and fixing the update i now have correct unit. image

rsnodgrass commented 2 months ago

Excellent! Thanks for fixing the manifest issue too.