I can’t seem to setup a scene that only changes the brightness and NOT the state.
The lights can change state depending on other conditions, but I want the brightness to change universally when its night/day
i.e.
scene:
- name: Night
entities:
light.hallway:
brightness: 150
- name: Day
entities:
light.hallway:
brightness: 250
i get the following error: 16-05-07 19:54:30 homeassistant.helpers.state: reproduce_state: Unable to reproduce state <state light.hallway=None; brightness=150 @ 2016-05-07T19:54:25.032289+10:00>
Which makes sense as the hallway light has no ‘state’ just = None.
Any way to set the brightness of a light without changing its state?
I have scenes that do just that what you are trying to accomplish. Like Paul us states you have to work with a light which has state “on” cause you are going to set brightness with an “update” on that state.
My hallway light fi reduces brightness to 25% at 22:30hrs so no one has to look for the lights at night when they need to take a leak or have the munchies.
The use-case is -
Motion sensors / Dash Buttons around the house which turn lights on and off, but depending on the time of day, the brightness will be different.
The lights aren’t necessarily ‘on’ when the sun sets or rises.
I guess I could do it with two separate automation triggers for every action, one for day and one for night, but that doesn’t seem like the ‘right way’.
I couldn’t work out how to use a variable for brightness i.e.
#################################################################
## Automations lights
#################################################################
automation:
- alias: 'Turn down hallway light to 25 percent'
trigger:
platform: time
after: "22:30:00"
action:
service: light.turn_on
entity_id: light.hallway
data:
brightness: 25
Now here is what you should be interested in. Check the trigger, condition and the scene it calls.
Each time my living light is turned on between 6pm and 12 it will turn om with a brightness of 100 (little under 50%)
You can try yourself. Make two scenes with two different timeframes and brightness settings and your good to go.