The problem that I have is that if light is switched off by physical switch then on power on it will start with the scene that was activated when it was powered down.
I would like to set up some kind of script/action that would be triggered when light is powered ON and connected to the network. That script would apply the scene based on time of day.
That is what I figured.
I guess what I am asking is not a standard setup. I would like to leave the existing light switch that was there for the regular light. And to trigger the scene update on light connect event.
Not a good idea, the zigbee network is alive (and it’s a mesh), if you add/remove a device, it change, and it’s not immediate.
On the logic the value “lastannounced” is the last time the device have rejoin the network, can try with this value, but not sure it’s something reliable.