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

When setting WebUI to Fahrenheit, HA Temp sensor still converts from C to F #25

Open
TheRykin opened this issue Apr 18, 2024 · 1 comment

Comments

@TheRykin
Copy link

TheRykin commented Apr 18, 2024

In the WebUI, if you set the temperature units to Fahrenheit, it will cause an incorrect reporting in Home Assistant if HA is also set to use Fahrenheit. The temperature sensor mistakenly converts from C to F, regardless of what the WebUI is set to. So when I changed the WebUI to use F, Home Assistant reported that the mini split was at 159F. (The HVAC entity reported the right temperature. It was the separate room temperature sensor that had the wrong temp)

Since HA automatically converts C to F, the sensor works fine when the WebUI is left at Celsius. This isn't much of a deal breaker since I mostly control my mini splits using Home Assistant, but wanted to mention it as I'm sure it's an easy fix.

@dzungpv
Copy link
Owner

dzungpv commented Jul 16, 2024

In the WebUI, if you set the temperature units to Fahrenheit, it will cause an incorrect reporting in Home Assistant if HA is also set to use Fahrenheit. The temperature sensor mistakenly converts from C to F, regardless of what the WebUI is set to. So when I changed the WebUI to use F, Home Assistant reported that the mini split was at 159F. (The HVAC entity reported the right temperature. It was the separate room temperature sensor that had the wrong temp)

Since HA automatically converts C to F, the sensor works fine when the WebUI is left at Celsius. This isn't much of a deal breaker since I mostly control my mini splits using Home Assistant, but wanted to mention it as I'm sure it's an easy fix.

This is HA bug, I get the value for sensor from the data serve to MQTT Climate room temperature component. When you change the unit in the web UI, the data still report correctly in the HA, and it is not convert automatically, it set in code

haConfig["temperature_unit"] = useFahrenheit ? "F" : "C";

https://www.home-assistant.io/integrations/climate.mqtt/#temperature_unit

You can check mqtt data send to HA, it report correctly the temperature when I change webui unit to F:

{"roomTemperature":91,"temperature":82,"compressorFreq":3,"fan":"auto","vane":"AUTO","wideVane":"SWING","mode":"cool","action":"cooling","compressorFrequency":3,"upTime":"00:00:27:05"}

You can manual change the unit of room temperature sensor to F will solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants