Trigger on Trådfri available

I have Ikea lights.
I have one that I usually turn on and off from the wall switch.
Trådfri lights remember the brightness they had when power was cut.

I would like the brightness to directly go down to 50% if it is late at night and I turn on the light. and 100% if it is during the day.
This is not a problem if I use a smart power switch, but I haven’t figured out a way to do this by cutting the power to the light.
Is there a trigger that triggers on availability?
Is there a way to accomplish this?

the state trigger can do that, but you will probably get flashbang before the automation kick in, because it is the light that remembers its state.

here is an example:

platform: state
entity_id: light.cuisine_1
from: unavailable
to: 'on'

the (to: ‘on’) is not obligatory though