mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 11:00:14 -04:00
initial push
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
alias: 'Season is autumn'
|
||||
initial_state: 'on'
|
||||
id: automation_season_is_autumn
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
- platform: time
|
||||
at: '03:00:00'
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{ 12 > now().month > 8 }}'
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.season
|
||||
option: Autumn
|
||||
@@ -0,0 +1,18 @@
|
||||
alias: 'Season is Christmas'
|
||||
id: automation_season_is_christmas
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
- platform: time
|
||||
at: '02:00:00'
|
||||
condition:
|
||||
- condition: template
|
||||
#value_template: '{{ ( now().month == 12 and now().day >= 1 ) and ( now().month == 12 and now().day < 31 ) }}'
|
||||
#value_template: "{{ state_attr('calendar.holidays_in_united_states','message') == 'Christmas Eve' or state_attr('calendar.holidays_in_united_states','message') == 'Christmas Day' or state_attr('calendar.holidays_in_united_states','message') == 'New Year''s Eve'}}"
|
||||
value_template: "{{ state_attr('calendar.holidays_in_united_states', 'message') in 'Christmas Eve' 'Christmas Day' 'New Year''s Eve' }}"
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.season
|
||||
option: Christmas
|
||||
@@ -0,0 +1,19 @@
|
||||
alias: 'Season is Easter'
|
||||
id: automation_season_is_easter
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
- platform: time
|
||||
at: '02:00:00'
|
||||
- platform: state
|
||||
entity_id: calendar.holidays_in_united_states
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{ states.calendar.holidays_in_united_states.attributes.message in "Good Friday" "Easter Sunday" "Easter Monday" }}'
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.season
|
||||
option: Easter
|
||||
@@ -0,0 +1,21 @@
|
||||
alias: 'Season is Spring'
|
||||
id: automation_season_is_spring
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
- platform: time
|
||||
at: '03:00:00'
|
||||
condition:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: '{{ 6 > now().month > 2 }}'
|
||||
- condition: template
|
||||
value_template: '{{ states.calendar.holidays_in_united_states.attributes.message not in "Good Friday" "Easter Sunday" "Easter Monday" }}'
|
||||
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.season
|
||||
option: Spring
|
||||
@@ -0,0 +1,16 @@
|
||||
alias: 'Season is Summer'
|
||||
id: automation_season_is_summer
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
- platform: time
|
||||
at: '03:00:00'
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{ 9 > now().month > 5 }}'
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.season
|
||||
option: Summer
|
||||
@@ -0,0 +1,30 @@
|
||||
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:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.season
|
||||
option: Winter
|
||||
Reference in New Issue
Block a user