Yoda-x/ha-zha-new

Xiaomi temperature sensor appears in celsius?

Closed this issue · 6 comments

It appears that my temperature sensor is appearing in celsius. There's no possible way it's currently 14.3C but 57F makes more sense.

image

Hi, do you set your HA to Fahrenheit?
The sensor provides Temperatur in celsius. So this would need to add a convert function.

My unit_system is set to imperial and the unit_of_measurement is Fahrenheit.

If the sensor reports Fahrenheit as the unit_of_measurement, shouldn't it be Fahrenheit?

Thanks for your feedback. I have some ideas where to tweak the code. Please stay tuned.
EDT: the sensor reports Celsius, but this seems to be overruled by the system settings.

@Yoda-x make temperature sensor Entity always return celsius for unit of measurement and then just use celsius for the state. Front end will convert temperature automatically to the system's unit of temp measurement.

yepp, already in my dev tree and tested. I was unsure if there are sensors reporting in F. But the cluster library only mentions C. So that's an easy one.

now on master