Advertisement
sslopes

Untitled

Apr 20th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. automation:
  2. - alias: gabinete Motion Detected
  3. initial_state: True
  4. trigger:
  5. - platform: state
  6. entity_id: sensor.sn5_pir
  7. from: "standby"
  8. to: "motion detected"
  9. condition:
  10. condition: and
  11. conditions:
  12. - condition: state
  13. entity_id: device_tracker.sebastiao
  14. state: 'not_home'
  15. - condition: state
  16. entity_id: device_tracker.graca
  17. state: 'not_home'
  18. action:
  19. - service: "light.turn_on"
  20. entity_id: light.sn5_led
  21. - service: camera.snapshot
  22. data:
  23. entity_id: camera.gabinete_cam
  24. filename: '/config/www/sala.jpg'
  25. - service: notify.telegram
  26. data:
  27. title: "movimento"
  28. message: "em {{now().strftime('%H:%M %d-%m-%Y')}}"
  29. data:
  30. photo:
  31. file: /config/www/sala.jpg
  32. caption: Movimento no Gabinete em {{now().strftime('%H:%M %d-%m-%Y')}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement