I’m using a ConBee ZigBee USB stick and a couple of IKEA Trådfri light bulbs RGB in my Home Assistant setup, added to Home Assistent through the deCONZ integration.
If the lights are turned off using the lamp’s light switch (bulb is made powerless) the IKEA Trådfri light bulb will use the brightness value I last used when turned on again, but the RGB color value is cleared to a very white default value.
I’d prefer if the light bulb could start on a warmer light than the default when turned on, so I’m trying to trigger an automation that changes the bulb’s RGB color value when the light bulb is reachable again. Any idea how I could achieve this?
I can see in the logs that deCONZ sends something when the lamp is turned on again, example:
DEBUG (MainThread) [pydeconz.deconzdevice] deconz_ikea_bulb: update reachable with True
DEBUG (MainThread) [pydeconz.websocket] Websocket data: {"e":"changed","id":"3","r":"lights","state":{"reachable":true},"t":"event","uniqueid":"xxxxxx"}
Is there any way to trigger an automation when “reachable” is set to “True”?
If not, any other suggestion? I think the lamp never get “state: Off” when turned off on the lamp’s power switch. So perhaps it’s possible to trigger the automation when the state is changed from either “Unknown => On” or from “On => On”. How would that automation look like?