Make ZigBee lamps change brightness when returning from offline

Hi,

I have Ikea tradfri lamps and the old style dumb switches, as we want to switch old style but want to have also control by smart phone…

So they are set to go on on return of power. And they go to last set brightness and color.

What I want is an automation that on return of a ZigBee device will set it’s brightness according to time of day.

And I want e.g. the bedroom lamps to dimm out in the evening. Like starting in daylight bright and dimming to orange 5% and then switch off. Like gliding down over the course of 2 h or so.

And in the morning I would like them to come on with orange 30 % and dimm up to blue 100% over the course of 3 minutes.

Any idea how to make that happen.

I can’t find a trigger on the lamps to indicate state online in the ZigBee network.

And I have failed so far as to make em glide dowon to off mode for the same reason, I don’t know when to start and hot to make em change the color and brightness seamlessly.

Thanks

There are (at least) a couple integrations doing that for you:

1 Like

That’s because there is no to: online state trigger, but there is a from: unavailable state you can use:

trigger:
  - platform: state
    entity_id:
      - light.your_ikea_light1
      - light.your_ikea_light2
    from: unavailable
...

Note that depending on which zigbee integration you use, it can take up to 10 minutes for the light to be marked as unavailable.

As for the rest of the automation, @koying has that part covered in his post above.

1 Like