Tplink kasa node red status

First post so i hope im in the right place.

I am attempting to have a set of lights in my closet change brightness depending on the time of day so i dont wake my wife.

I still want to use the switch to turn them on or off, but between 10PM and 9AM they turn on at 10% when the switch is pressed and outside of that they come on at 100%.

currently, i have it configured to look for a state change, check to see if the time is within my window and call a service for brightness depending on the time.

this works but there is a few seconds, between 3 and 5, when it comes on at the previous state. not a big deal for the morning but at night that means it comes on at 100 for a few seconds.

i can only see a way to set the brightness by turning on the light with a call service and then back off, but this feels clunky.

is there a way to set brightness without calling the light to turn on? so it just shifts brightness to 10% between 10PM and 9AM no matter what happens?

A service call is just an execution of the HA service call, so you need to look at what is possible there.
You might be able to set the brightness before the turn_on call or you might be able to do it within the turn_on call.

sorry, just getting back around to this.

the light domain only gives me state change options. i am trying to set the value without changing the state. the switches have an on/of paddle toggle, as well as 2 buttons that set brightness. you can push the dimmer buttons to set the brightness for the next time the switched is on.

i.e. lights are on at 100%, turn off lights, set brightness to 25% with the lights off, push the button to turn on lights, lights come on at 25%.

that is the action I am trying to replicate based on time of day. is there another command or function that might be more appropriate for this? i am very new to NR and automation

image

Maybe you can try to pull the state of the device and then use that state to set it again with the extra settings you want.
So if the device is off, then you use turn_off and the brightness data, and vice-versa.