-
Erick Hitter authored
96a334d
2786b7bf
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
scripts.yaml 3.02 KiB
# Wireless charger
wireless_charger_set_timeout:
alias: "Set timeout on wireless charger"
sequence:
# Cancel ev. old timers
- service: script.turn_off
data:
entity_id: script.wireless_charger_timeout
- service: switch.turn_on
data:
entity_id: switch.wireless_charger
# Set new timer
- service: script.turn_on
data:
entity_id: script.wireless_charger_timeout
wireless_charger_timeout:
alias: "Turn off wireless charger after three hours"
sequence:
- delay:
hours: 5
- service: switch.turn_off
data:
entity_id: switch.wireless_charger
# Office lights timeout
office_lights_set_timeout:
alias: "Set timeout for office lights"
sequence:
# Cancel ev. old timers
- service: script.turn_off
data:
entity_id: script.office_lights_timeout
# Set new timer
- service: script.turn_on
data:
entity_id: script.office_lights_timeout
office_lights_timeout:
alias: "Turn off office lights after one hour of inactivity"
sequence:
- delay:
hours: 1
- service: light.turn_off
data:
entity_id:
- light.office
- light.erick_s_desk_lamp
- service: switch.turn_off
data:
entity_id: switch.lava_lamp
# Living Room lights timeout
living_room_lights_set_timeout:
alias: "Set timeout for living room lights"
sequence:
# Cancel ev. old timers
- service: script.turn_off
data:
entity_id: script.living_room_lights_timeout
# Set new timer
- service: script.turn_on
data:
entity_id: script.living_room_lights_timeout
living_room_lights_timeout:
alias: "Turn off living room lights after two hours of inactivity"
sequence:
- delay:
hours: 2