Kane610/deconz

Forward reachable events to HomeAssistant

mwhrtin opened this issue · 5 comments

Is it possible to somehow forward received reachable events to HomeAssistant?

Whenever a light is powered on I see these prints in the HomeAssistant logs:

[pydeconz.deconzdevice] my_deconz_light: update reachable with True
[pydeconz.websocket] Websocket data: {"e":"changed","id":"1","r":"lights","state":{"reachable":true},"t":"event","uniqueid":":aa:bb:cc:dd:ee:ff-01"}

From the looks of it deCONZ is always sending an updated reachable: true when the light is powered on, even if the light's previous reachable state was true in the Rest API. But it appears as if HomeAssistant is unaware of this reachable update.

I would like to be able to trigger an automation in HomeAssistant when a reachable change message is received. Is it possible to forward this to HomeAssistant somehow, trigger a state update or something?

They are. So hass can tell user if they're available or unavailable. Nothing gets signaled if a state doesn't change. There is no reason to.

Okay, under normal circumstance that makes sense.

So the "state isn't changed so nothing is signaled" is a check HomeAssistant does and decides that no further action is needed?

Pydeconz tells hass what attributes get updated

def update_attr(self, attr):

A reachable change will always be signaled, and updated on relevant devices

Is there a solution to this? I'm facing the exact same issue. I already asked at Home Assistant Community, but no reponse.

Well. All I know is written above. I'd say you should create an issue on deconz github since the behavior as far as I know is correct with the hass implementation.

If you could share logs that explicitly point to this issue can be improved with the component I will of course help you