core: homekit no longer rounds temps converted from C to F and long floats are not handled by some climate entities including ones from zwavejs
The problem
Since a late 2024 release of HA, setting my thermostats to 74°F through HomeKit makes Home Assistant set it to 73°F instead, and 70°F to 69°F.
What version of Home Assistant Core has the issue?
2025.1
What was the last working version of Home Assistant Core?
2024.x
What type of installation are you running?
Home Assistant Container
Integration causing the issue
HomeKit Bridge
Link to integration documentation on our website
https://www.home-assistant.io/integrations/homekit/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
HomeKit send command set_temperature to TargetTemperature to 23.3°C for Upstairs Thermostat
5:28:31 PM
Upstairs Thermostat set from Heat (77°F) to Heat (73.9°F).
5:28:31 PM
Upstairs Thermostat set from Heat (73.9°F) to Heat (73°F).
5:28:36 PM
Additional information
Might be related to #98578 but only recently started happening. I see the PR to fix it #131973 was merged, but as of 2025.1, it’s still happening, so not sure if it didn’t fix it or it didn’t get released yet.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 22 (13 by maintainers)
I just tested this and it set it to 73°F. Actually, it set it to 73.5°F, but this is reported by the thermostat as 73°F. It’s a little less wrong, but it’s still wrong. When I set to 74, it gets converted to 23.3, which is re-converted to 73.94, and Z-Wave JS rounds this down to 73.9 and sends it straight to the thermostat. The thermostat rounds this down to 73.5 when setting the setpoint.
So I don’t believe this is a Z-Wave JS issue since the thermostat itself is rounding down from 73.9 to 73.5. Z-Wave JS has no idea what Home Assistant wants when it sends it a setpoint of 73.94. Home Assistant shouldn’t be sending 73.9 to the thermostat in the first place, since the user chose 74 on the HomeKit interface.
No. This was already explained above
Yes. Similar conclusion for a similar problem with openhab https://github.com/openhab/openhab-addons/pull/4108#issuecomment-457909669
This problem is going to happen for other sources as well. HomeKit just happens to be the one that we are talking about in this issue. It doesn’t make sense for every potential caller to have to truncate the data since it would mean we would have to change every integration that makes a service call to set temperatures. It’s much better for zwavejs to do it since it will fix it for all callers
It might be that zwave chokes on anything that can’t be represented in 32 bits so while that’s not a meaningful loss of precision to discard in HomeKit, it may point to a larger issue with zwave consuming data from other sources so it would be better for someone on the zwave side to take a look as it may have deeper implications than temperature set points