Hello everybody,
I try to set up my light in the living room and my idea was to use a input_select to set the brightness. I have set a automation that circles through the states but I am not able to put the input select value in the automation. here is what I have:
The State Trigger monitors the state of input_select.state_light. When its state changes, the automation is triggered and executes the service call which sets the light’s brightness to the new state value.
Your version was close but included a few things that were either unnecessary or incorrect.
Your State Trigger included to: "off" however input_select.state_light doesn’t have an off value so the automation will never trigger.
Your template contains several syntax errors. The correct form would be brightness_pct: "{{ states('input_select.state_light') }}"
but there’s no need to use the states() function because the value you want is already available via the Trigger State Object.
You included flash: long and I’m not sure why because you didn’t mention that you wanted the light to flash. If you do, just put that back into the example I posted (below brightness_pct).
thank you soo mutch for your help. I corrected my erors and now it is working (almost) perfectly
I have one last question on the input_states:
I am able to turn the light on and off as well as switch through the cases. The last step I would need to implement is to set the state to a certain case when the light is turned off (or on)
For the benefit of other users, please consider marking my first post with the Solution tag. It will automatically place a check-mark next to the topic’s title. This signals to other users that this topic now has an accepted solution and helps them find answers to similar questions.