Closed b3nj1 closed 2 years ago
I have a theory that the problem is that native_unit_of_measurement is not being advertised. https://developers.home-assistant.io/blog/2021/08/12/sensor_temperature_conversion
With 1.0 I switched the sensor entity to use native value. Is your value that you're sending the entity node in C or F? I believe with native it expects the unit type to be what the value is and not what you want it to display. If this is the case I'll need to add that to the release notes.
In my case , the sensor entity node is sending C and is using C as its unit, so it is "what the value is" not what I "want it to display". So, that doesn't seem to be it.
In HA, I don't have any customizations on the sensor. I globally have imperial as my default. In HA, the sensor shows up with unit of F. UPDATE: I tried adding native_unit_of_measurement: °C
as a customization, but it didn't change anything.
The values/units are shown above in the screen grabs both in Node-Red and in HA devices in case my description here isn't clear.
It seems other integrations are seeing similar bad temps: https://github.com/home-assistant/core/issues/61163
Should this be native_unit_of_measurement?
Should this be native_unit_of_measurement?
The sensor should be using the one from HA SensorEntity
I'll take a closer look at this.
@b3nj1 let me know if that fixes it for you. If not reopen the issue.
Version of the custom_component
Latest: v1.0.1
Configuration
Describe the bug
With v0.5.4, the sensor showed up in Home Assistant with the correct temperature. Since I have my HA configured for imperial, the would then be converted to °F for display.
With v1.0.1, the sensor shows up wrong. It looks like it has been converted CtoF twice: 20C -> 69F; 69"C" -> 156"F"