Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabiosoft/9fa452affcf525797093155a4dfad92b to your computer and use it in GitHub Desktop.
Save fabiosoft/9fa452affcf525797093155a4dfad92b to your computer and use it in GitHub Desktop.
Home Assistant Blueprint to toggle a device after a period of time since state was set
blueprint:
name: Toggle device status after a period of time
description: "Once a device has been in a defined status for a period of time, toggle it's status"
domain: automation
input:
trigger_device:
name: Device
description: Which device to monitor and toggle?
selector:
entity:
trigger_state:
name: State
description: What state begins time period?
trigger_time:
name: Duration
description: What period to wait before toggling state?
selector:
duration:
mode: restart
max_exceeded: silent
trigger:
platform: state
entity_id: !input trigger_device
to: !input trigger_state
for: !input trigger_time
action:
service: homeassistant.toggle
data:
entity_id: "{{ trigger.entity_id }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment