feat: Force holiday light turn-on outside of Christmas Season

This commit is contained in:
2024-11-09 07:56:42 -08:00
parent d32dfcebcb
commit 4bd1eeca00
2 changed files with 34 additions and 10 deletions

View File

@@ -1,5 +1,13 @@
# Holiday Package
# -----------------------------------------------------------------------------
# Holiday State Helpers
input_boolean:
holiday_override_lights_night:
name: Always Turn On Holiday Lights at Night
holiday_override_lights_morning:
name: Always Turn On Holiday Lights in the Morning
# -----------------------------------------------------------------------------
# Holiday Sensors
template:
@@ -41,7 +49,11 @@ automation:
- platform: sun
event: sunset
condition:
- alias: Christmas Season or Light Override Enabled
condition: or
conditions:
- "{{ is_state('binary_sensor.is_christmas_season', 'on') }}"
- "{{ is_state('input_boolean.holiday_override_lights_night', 'on') }}"
action:
- service: switch.turn_on
target:
@@ -55,7 +67,11 @@ automation:
- platform: sun
event: sunset
condition:
- alias: Christmas Season or Light Override Enabled
condition: or
conditions:
- "{{ is_state('binary_sensor.is_christmas_season', 'on') }}"
- "{{ is_state('input_boolean.holiday_override_lights_night', 'on') }}"
action:
- service: light.turn_on
data:
@@ -70,7 +86,11 @@ automation:
- platform: time
at: '04:30:00'
condition:
- alias: Christmas Season or Light Override Enabled
condition: or
conditions:
- "{{ is_state('binary_sensor.is_christmas_season', 'on') }}"
- "{{ is_state('input_boolean.holiday_override_lights_morning', 'on') }}"
action:
- service: switch.turn_on
target:
@@ -84,7 +104,11 @@ automation:
- platform: time
at: '04:30:00'
condition:
- alias: Christmas Season or Light Override Enabled
condition: or
conditions:
- "{{ is_state('binary_sensor.is_christmas_season', 'on') }}"
- "{{ is_state('input_boolean.holiday_override_lights_morning', 'on') }}"
action:
- service: light.turn_on
data:

View File

@@ -680,7 +680,7 @@ automation:
- alias: Process callback
choose:
- conditions: "{{ wait.remaining > 0 and wait.trigger.event.data.action == action_ignore }}"
- conditions: "{{ wait.remaining > 0 and 'event' in wait.trigger and wait.trigger.event.data.action == action_ignore }}"
sequence:
- alias: Notify that the event was ignored
action: notify.security
@@ -692,14 +692,14 @@ automation:
|first|default({'attributes':{'friendly_name':'Automation'}})
%}Open garage door ignored by {{ person.attributes.friendly_name }}
- conditions: "{{ wait.remaining > 0 and wait.trigger.event.data.action == action_close }}"
- conditions: "{{ wait.remaining > 0 and 'event' in wait.trigger and wait.trigger.event.data.action == action_close }}"
sequence:
- alias: Close garage door
action: switch.turn_on
target:
entity_id: switch.garage_door_relay_1
- conditions: "{{ wait.remaining > 0 and wait.trigger.entity_id == 'alarm_control_panel.ha_alarm' }}"
- conditions: "{{ wait.remaining > 0 and 'entity_id' in wait.trigger and wait.trigger.entity_id == 'alarm_control_panel.ha_alarm' }}"
sequence:
- alias: Notify the event was cancelled
action: notify.security
@@ -771,7 +771,7 @@ automation:
- alias: Process callback
choose:
- conditions: "{{ wait.remaining > 0 and wait.trigger.event.data.action == action_ignore }}"
- conditions: "{{ wait.remaining > 0 and 'event' in wait.trigger and wait.trigger.event.data.action == action_ignore }}"
sequence:
- alias: Notify that the event was ignored
action: notify.security
@@ -783,14 +783,14 @@ automation:
|first|default({'attributes':{'friendly_name':'Automation'}})
%}Unlocked front door ignored by {{ person.attributes.friendly_name }}
- conditions: "{{ wait.remaining > 0 and wait.trigger.event.data.action == action_lock }}"
- conditions: "{{ wait.remaining > 0 and 'event' in wait.trigger and wait.trigger.event.data.action == action_lock }}"
sequence:
- alias: Lock front door
action: lock.lock
target:
entity_id: lock.front_door_lock_doorlock
- conditions: "{{ wait.remaining > 0 and wait.trigger.entity_id == 'alarm_control_panel.ha_alarm' }}"
- conditions: "{{ wait.remaining > 0 and 'entity_id' in wait.trigger and wait.trigger.entity_id == 'alarm_control_panel.ha_alarm' }}"
sequence:
- alias: Notify the event was cancelled
action: notify.security