Files
2025-10-10 20:24:52 -04:00

31 lines
991 B
YAML

alias: "Season is Winter"
id: automation_season_is_winter
initial_state: "on"
trigger:
- platform: homeassistant
event: start
- platform: time
at: "03:00:00"
condition:
- condition: and
conditions:
- condition: template
value_template: "{{ ( now().month == 12 ) or ( now().month < 3 ) }}"
- condition: or
conditions:
# Either after the 1st of January
- condition: template
value_template: "{{ now().month == 1 and now().day >= 1 }}"
- condition: and
conditions:
# or before the 12th of December and we've not turned it on early
- condition: template
value_template: "{{ now().month == 12 and now().day < 12 }}"
- condition: template
value_template: '{{ states("input_select.season") != "Christmas" }}'
action:
- action: input_select.select_option
data:
entity_id: input_select.season
option: Winter