kvj / hass_nuki_ng

Better support for Nuki devices in the Home Assistant
MIT License
167 stars 32 forks source link

[lock] state "unlachtched" not exposed to Home Assistant #160

Closed weinbrand closed 9 months ago

weinbrand commented 9 months ago

Hello Everyone!

Am I right, that the lock does not show the state "unlatched" in Home Assistant? It is showing properly "locked" and "unlocked". But I would like to do automations based on the unlatched status.

Can anyone confirm this? Can this state be added to the integration? I believe this would help others as well.

Thanks a lot for this beautiful work! Christian

kvj commented 9 months ago

It does show. https://github.com/kvj/hass_nuki_ng/blob/8d8a92ddeec6ec7a0d42cedb1fe7d5fb45315a30/custom_components/nuki_ng/nuki.py#L241 But it's not reliable. Nuki Bridge doesn't reliably report each status when the status is being quickly changed. e.g. unlocked -> unlatching -> unlatched -> unlocking and so on.

I wouldn't recommend relying on Nuki unlatch/open status for any automation. Any external zigbee/wifi door sensor will be much more reliable to detect that door has been open

weinbrand commented 9 months ago

Ok, thanks a lot for this quick answer!

Then I will do it as you propose and will go for a door switch.