home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.88k stars 29.56k forks source link

Thermostat rounding errors - changing setpoint #98578

Open bcrawfo2 opened 1 year ago

bcrawfo2 commented 1 year ago

The problem

Hoping I got in the right section. I have a Honeywell (Residio) thermostat that is integrated via HomeKit Device. There is at least one temperature set point that when selected, a few seconds later the set point changes. For example, if I set it to 73....it changes to 74. I wonder if the set point is stored in C and rounded somewhat when it displays in F. Happy to provide any additional info.

What version of Home Assistant Core has the issue?

core-2023.8.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Homekit Device

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

kmlucy commented 1 year ago

I'm having the same issue.

bcrawfo2 commented 1 year ago

Here is a previous issue where they asked to open a new issue. https://github.com/home-assistant/core/issues/30039

home-assistant[bot] commented 1 year ago

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `homekit` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign homekit` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


homekit documentation homekit source (message by IssueLinks)

bdraco commented 1 year ago

HomeKit does everything in C. There is always going to be a conversion loss that we can't fix.

kmlucy commented 1 year ago

Can we reduce the step value of the conversion then, maybe to .1? Right now it is impossible to set the thermostat to certain values, including 73 and 74.

lscorcia commented 1 year ago

I think I experienced a similar issue while working on #95696 , setting temperature in °C in the UI when the native unit is °F seems to not round towards the nearest PRECISION_HALVES or PRECISION_WHOLE as requested by the device. But I didn't spend enough time to troubleshoot this, it maybe a Lyric integration issue.

bdraco commented 1 year ago

Can we reduce the step value of the conversion then, maybe to .1?

It already is 0.1

https://github.com/home-assistant/core/blob/4073f56c5eb4205457b219d3f04a2edd868fa279/homeassistant/components/homekit/type_thermostats.py#L230

bcrawfo2 commented 1 year ago

If the data is actually stored in C and it's rounded to tenths, I don't see how this is an issue. See table below

image
kmlucy commented 11 months ago

Yeah, it's definitely not working the way it's intended. I have to switch to the native app to set it to 73°, and I have to set it to 73° in order to get 74°.

issue-triage-workflows[bot] commented 8 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

kmlucy commented 8 months ago

This is still an issue.

kmlucy commented 6 months ago

@bdraco If I enable debug logging for homekit, it seems like it is using half degree steps. I set the thermostat to 73°, and the PUT request is for 23.0 rather than 22.8. There are then two callbacks, the first for 23.0, the second for 23.5, which rounds to 74°.

2024-02-28 09:44:40.469 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 192.168.5.189: raw request: b'PUT /characteristics HTTP/1.1\r\nHost: 192.168.5.189\r\nContent-Length: 53\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":2,"iid":38,"value":23.0}]}'
2024-02-28 09:44:41.059 DEBUG (MainThread) [aiohomekit.controller.ip.connection] 192.168.5.189: raw response: bytearray(b'')
2024-02-28 09:44:41.059 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 38): {'value': 23.0}}
2024-02-28 09:44:41.059 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for 55:2F:E4:FE:04:26
2024-02-28 09:44:41.215 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 38): {'value': 23.5}}
2024-02-28 09:44:41.216 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for 55:2F:E4:FE:04:26
2024-02-28 09:44:50.150 DEBUG (MainThread) [aiohomekit.controller.abstract] callback ev:{(2, 41): {'value': 50}}
2024-02-28 09:44:50.150 DEBUG (MainThread) [homeassistant.components.homekit_controller.connection] Called async_set_available_state with True for 55:2F:E4:FE:04:26

Is this due to https://github.com/home-assistant/core/issues/45332#issuecomment-764377184?

issue-triage-workflows[bot] commented 3 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

kmlucy commented 3 months ago

This is still an active issue.

issue-triage-workflows[bot] commented 2 days ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

kmlucy commented 2 days ago

@bdraco This is still an issue. Is there any progress on this? I cannot set my thermostats to 73°.