I have a IKEA Tradfri LED driver with several MITTLED lights attached to it - I use a CC2531 on my Raspberry Pi to connect to the driver.
I have set up an automation that turns on the lights at nighttime using a motion sensor (Vallhorn, also from IKEA). Being dark, I had set the lights at a low intensity, to be easy on the eyes.
What I want to do is to set the lights startup level at 100% when the lights are turned off by the sensor, because when I manually turn on the lights the next day I need them to start full brightness.
There is a “Set value for Left Counterop Lights Start-up current level” option for the LED driver, but does not seem to work - when manually turning on the lights, they turn on at the nighttime intensity.
The wireless switch (Rodret) is connected directly to the driver due to the fact that the HA on my RPi is not 100% available, and I need to be able to control my lights without it - so I cannot add an automation to set the lights at 100% if turned on by the switch…
The only way I managed to achieve this is by turning the lights at 100% intensity before turning them off, but that causes a bright flash each and every time - and I want to avoid this.
z2m has an option “Execute if off” which, when enabled, should allow you to set the brightness without turning on the light. From what I understand, ZHA should support this feature as well.
However, since HA only supports setting brightness with the light.turn_on action, you may have to use an MQTT action to set the brightness without actually turning the light on. Similar to this.
Thanks, but I’m not quite sure what to do with that information. I mean, I see triggers, conditions and actions in the automation YAML, but no service section. Where should that go?
I wonder if I use the wrong option, as there is a “Set value for Left Counterop Lights On level” option too. I’ll test later.
Several versions ago, service was renamed to action. The examples in the linked post predate that change. Simply replace service with action in the examples.