As the title suggests, I am looking to create an automation to trigger if a device is away from home for 1 hour or more. I have the automation setup to turn off my son’s plugs when he leaves the house and it works but I need it to wait for an hour before it does, just in case he nips to the shop or something.
Does anyone have any ideas how I could add it to this automation?
alias: Dylan sockets off
description: ""
trigger:
- platform: state
entity_id:
- device_tracker.dooz
from: home
for:
hours: 0
minutes: 0
seconds: 0
condition: []
action:
- type: turn_off
device_id: 284edb890243c648e9e611b028d08bdf
entity_id: switch.dylans_socket_s1
domain: switch
- type: turn_off
device_id: 284edb890243c648e9e611b028d08bdf
entity_id: switch.dylans_socket_s2
domain: switch
mode: single