mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-22 00:55:18 +00:00
29 lines
760 B
YAML
Executable File
29 lines
760 B
YAML
Executable File
######################################################################
|
|
## Stuff that needs to happen after 10pm.
|
|
######################################################################
|
|
|
|
- alias: Automated NIGHT WatchDog!
|
|
trigger:
|
|
- platform: state
|
|
entity_id: switch.living_room_amp
|
|
state: 'on'
|
|
for: '00:20:00'
|
|
|
|
condition:
|
|
- condition: state
|
|
entity_id: sun.sun
|
|
state: 'below_horizon'
|
|
- condition: time
|
|
after: '22:00:00'
|
|
before: '09:00:00'
|
|
|
|
#Turn it off twice for good measure!
|
|
action:
|
|
- service: switch.turn_off
|
|
data_template:
|
|
entity_id: "{{ trigger.entity_id }}"
|
|
- delay: 00:01:00
|
|
- service: switch.turn_off
|
|
data_template:
|
|
entity_id: "{{ trigger.entity_id }}"
|