Earth Hour tomorrow evening encourages us to give an hour for Earth and switch off non-essential electric lights, for one hour from 8:30 to 9:30 PM.
Sounds like a perfect opportunity to automate this
As a precondition, you have to add date
and time
sensors: Time & Date - Home Assistant
- Trigger:
time
sensor - Condition:
date
sensor matches tomorrow’s date - Actions:
- Disable my automation that switches the lights on when I come home after sunset
- Turn on the “lights off” scene
- Wait one hour
- Enable the “welcome light” automation again
- If I’m home, then turn on the “evening lights” scene
alias: Lights off for Earth Hour
description: ""
triggers:
- trigger: time
at: "20:30:00"
conditions:
- condition: state
entity_id: sensor.date
state: "2025-03-22"
actions:
- action: automation.turn_off
metadata: {}
data:
stop_actions: true
target:
entity_id:
- automation.welcome_light
- action: scene.turn_on
metadata: {}
data:
transition: 10
target:
entity_id: scene.lights_off
- delay:
hours: 1
minutes: 0
seconds: 0
milliseconds: 0
- action: automation.turn_on
metadata: {}
data: {}
target:
entity_id: automation.welcome_light
- if:
- condition: state
entity_id: person.flo
state: home
then:
- action: scene.turn_on
metadata: {}
data:
transition: 10
target:
entity_id: scene.evening_lights
mode: single
See also this blog post about an earlier attempt: https://bensmann.no/earth-hour-automating-lights-in-our-smart-home/