Open bob-lobster opened 2 months 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!
(message by CodeOwnersMention)
homekit documentation homekit source (message by IssueLinks)
The Home Assistant frontend client polls the state after ~3s to see if the state change actually happened after you flip a switch.
The iOS HomeKit client doesn't do that, and it always assumes the turn on action was successful.
There are no settings we can pass to iOS that would enable the kind of behavior you want.
You could implement a 3s re-check of the state with something like this https://github.com/home-assistant/core/commit/d87267cef9366b0951638a283333d760e20bc8cb
https://github.com/home-assistant/core/tree/hk_resync
I'm not so sure its a good idea to make this the default behavior though as it will likely be a breaking change for people who relied on it not resyncing state
I‘m sorry I know nothing of the inner workings but with that change would the behaviour be like this?
I absolutely believe though that the default behaviour should be that when I open HK I will see the same as in HA.
The problem
When changing the state of an entity through HomeKit but the operation fails and the entity remains in the previous state in Home Assistant the correct state is not sent back to HomeKit and HomeKit will show the wrong state until its state changes again.
To replicate:
I would expect the behaviour to be as in the Home Assistant UI: The switch will show as on for a second and then off again.
I noticed the behaviour originally when a TV and receiver media player exposed to HomeKit was unable to be turned on and the state remained on indefinitely even though the entity was off the entire time. If this is the same issue it seems to be an easy way to replicate it.
https://github.com/user-attachments/assets/8aad2034-6053-4358-9471-55a5e4061f2f
What version of Home Assistant Core has the issue?
core-2024.8.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
homekit
Link to integration documentation on our website
https://www.home-assistant.io/integrations/homekit/
Diagnostics information
config_entry-homekit-01J5RBG023BC0JXA0XTA2TPYFE.json
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response