mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-23 01:09:41 +00:00
21 lines
653 B
YAML
Executable File
21 lines
653 B
YAML
Executable File
##############################################################################
|
|
### Detect when things are on and forgotten about.
|
|
##############################################################################
|
|
|
|
- alias: Printer on for more than 35 minutes
|
|
trigger:
|
|
- platform: state
|
|
entity_id: switch.printer_outlet
|
|
state: 'on'
|
|
for: '00:35: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 }}"
|
|
|