I have the following automation so that as (or a little before) the sun sets, the lights in our home slowly turn on from a zero state. Unfortunately, this only works like 40% of the time. The other 60% of the time, SOME (not all) random lights will be stuck on 1% brightness until changed.
For example, all of the lights will turn on to their appropriate final brightness after the transition except the living room, or bedroom, depending on the randomness of what’s going on.
Also, I’m sure someone will ask: the reason that they have to start at 1% is that if the previous percentage was 50% (for example), then the transition that occurs for an hour will start from 50% instead of 0%. We want all of the lights to start from a zero state.
- id: '1552173395767'
alias: Living Room - Sunset
trigger:
- event: sunset
offset: -01:30:00
platform: sun
condition:
- condition: state
entity_id: sensor.denonsource
state: 'Off'
action:
- data:
brightness_pct: '1'
entity_id: light.living_room
kelvin: '2700'
service: light.turn_on
- delay: 00:00:04
- data:
brightness_pct: '100'
entity_id: light.living_room
transition: '3600'
service: light.turn_on
- id: '1552173567058'
alias: Upstairs Rooms - Sunset
trigger:
- event: sunset
offset: -01:30:00
platform: sun
condition: []
action:
- data:
brightness_pct: '1'
entity_id: light.bedroom,light.dog_room
kelvin: '2700'
service: light.turn_on
- delay: 00:00:04
- data:
brightness_pct: '100'
entity_id: light.bedroom,light.dog_room
transition: '3600'
service: light.turn_on
- id: '1552173592888'
alias: Entryway - Sunset
trigger:
- event: sunset
offset: -01:30:00
platform: sun
condition:
- condition: state
entity_id: sensor.denonsource
state: 'Off'
action:
- data:
brightness_pct: '1'
entity_id: light.entryway
kelvin: '2700'
service: light.turn_on
- delay: 00:00:04
- data:
brightness_pct: '30'
entity_id: light.entryway
transition: '3600'
service: light.turn_on
- id: '1567046215237'
alias: Hallway - Sunset
trigger:
- event: sunset
offset: -01:30:00
platform: sun
condition:
- condition: state
entity_id: sensor.denonsource
state: 'Off'
action:
- data:
brightness_pct: '1'
entity_id: light.hallway
kelvin: '2700'
service: light.turn_on
- delay: 00:00:04
- data:
brightness_pct: '50'
entity_id: light.hallway
transition: '3600'
service: light.turn_on