Automation when connecting Zigbee device

Hey everyone!

So I know the question has probably been asked already, but I couldn’t find a satisfying answer to my issue.

I recently bought a few Ikea Tradfri lightbulbs that I want to use to light my living room. I connected them to my Home Assistant using a Zigbee dongle, and everything seems to be working fine so far.

Now here’s my issue. One of the bulbs is plugged into the ceiling light, and toggled using a standard lightswitch in the wall.

What I would like to achieve is : whenever the ceiling light is turned on, have HA automatically turn on the other Zigbee bulbs in the room (which will be permanently powered)

I can’t seem to find a way to start an automation whenever a Zigbee device connects to ZHA, but maybe there’s some workaround that I’m not aware of?

I know the easiest answer is to use Zigbee switches of course, but I still need to figure out my setup, and my whole house still works on dumb wired ligts, so I’d rather keep using my standard switches for now if there’s a way

Any help appreciated
Thanks!

There’s likely a more sophisticated trigger or template that could be utilized, but I’m not yet that guy.

You might consider using a Helper to create a group of lights consisting of the “other Zigbee bulbs in the room”. Then create an automation that turns the group on when the switched bulb turns on.

Use a state trigger
Something like this :

But it can take a while before the other lights will turn on, as cutting the power to a zigbee light is not advisable, and it takes some time to rejoin the Zigbee mesh.

I gave this a try, but unfortunately for some reason my bulbs don’t seem to switch to “unavailable” state when they get disconnected from ZHA

Integrations → ZHA → Configure.
The defaults are 2hours for mains powered devices and 6hours for battery powered.

Your switched bulb will be unavailable when power to it is switched off, but the other bulbs are always available (in an on or off state).

1 Like

That helps a lot, thanks!

I set it to 1 second for mains powered devices, it works fine with very little delay when turning on, but for some reason there’s a much longer delay when turning off. I’ll look into it, thanks for the advice

I’ll leave the topic open for a bit in case someone has other suggestions