Advertisement
death2all110

Garage Door Automation YAML

Feb 25th, 2023 (edited)
734
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.90 KB | None | 0 0
  1. alias: Open Garage Door when Blake Arrives Home
  2. description: ""
  3. trigger:
  4.   - platform: device
  5.     device_id: fbf42f78c42fa41fe9d751ed9c7576fc
  6.     domain: device_tracker
  7.     entity_id: device_tracker.blake_s_s22_ultra
  8.     type: enters
  9.     zone: zone.home
  10. condition:
  11.   - condition: and
  12.     conditions:
  13.       - condition: template
  14.         value_template: >-
  15.           {{
  16.           (as_timestamp(now())-as_timestamp(states.cover.garage_door_2.last_changed))
  17.           > 600 }}
  18.       - condition: template
  19.         value_template: >-
  20.           {{
  21.           (as_timestamp(now())-as_timestamp(states.device_tracker.blake_s_s22_ultra.last_changed))
  22.           < 300 }}
  23. action:
  24.   - device_id: 8d61ad9ca67fa0963cf3368baf666776
  25.     domain: cover
  26.     entity_id: cover.garage_door_2
  27.     type: open
  28.   - service: notify.mobile_app_blake_s_s22_ultra
  29.     data:
  30.       message: Garage Door Opened.
  31. mode: single
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement