core: Homekit state of covers in Home App sometimes not correct

The problem

I am using the Apple Home App as UI with the Homekit integration of Home Assistant. I have integrated a lot of Homematic devices, but with covers I sometimes have this problem:

When I open or close a cover via the physical wall button the Home App stayes in “closing”/“opening” state, even if the cover itself is closed/opened completly. In the Home Assistant UI the cover state is showed correctly, only in the Apple Home App the cover state keeps wrong. A restart of the Home App does not help. I even tried to completly resetup my Home in the App, but the error is still there.

This only happens when using the physical button, and only sometimes (5 out of 10 tries) when using the Home App UI to open/close the covers all covers are always shown with the correct state.

Environment

  • Home Assistant Core release with the issue: 0.116.4
  • Last working Home Assistant Core release (if known): na
  • Operating environment (OS/Container/Supervised/Core): Container
  • Integration causing this issue: Homekit
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/homekit/

Problem-relevant configuration.yaml


Traceback/Error logs


Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (15 by maintainers)

Commits related to this issue

Most upvoted comments

@bdraco hm thats a pitty… is there anything we could do to get the smoothness back and in addition the correct end state, too? this non-smooth behaviour is really bad in using it… its absolutely confusing the user now, he/she has a lot of trouble now with pressing the button multiple times etc.

Since most covers (maybe all) don’t update when the position changes between 2-99 (unless the cover stops), we simplify don’t have enough information to determine the position of the cover beyond open / closed (and opening/closing for the integrations that due report that).

Some of the covers do an optimistic set so the behavior is better, but that’s up to the developer of the integration on how to implement that. We can only report the state that the integration gives us if we want it to be reliable.

lutron_caseta, lutrion_caseta_pro (custom), somfy implement optimistic state as an option or by default.

homematic does not so that might be a feature request worth posting here: https://community.home-assistant.io/c/feature-requests/13

If it’s good for a week, I’ll make the adjustment in the code.

have it running niw over the day with DEVICE_PRECISION_LEEWAY set to 10. So far, no problems. I will keep an eye on it over the next days.