Advertisement
GrzegorzM

Powiadomienie po wykryciu ruchu ze zrzutem z kamery

Jan 22nd, 2023
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.31 KB | None | 0 0
  1. alias: Kotek czeka - powiadomienie
  2. trigger:
  3.   - platform: event
  4.     event_type: dahua_event_received
  5.     event_data:
  6.       name: Dahua4
  7.       Code: CrossLineDetection
  8.       action: Start
  9.       data:
  10.         Direction: LeftToRight
  11. condition:
  12.   - condition: not
  13.     conditions:
  14.       - condition: state
  15.         entity_id: timer.kotek_czeka_wznowienie
  16.         state: active
  17. action:
  18.   - service: timer.start
  19.     target:
  20.       entity_id: timer.kotek_czeka_wznowienie
  21.   - service: notify.mobile_app_oppo_a52
  22.     data:
  23.       message: Wpuścić kotka
  24.       data:
  25.         tag: persistent_kitty
  26.         channel: Kotek Czeka
  27.         importance: high
  28.         ttl: 0
  29.         priority: high
  30.         color: "#2DF56D"
  31.         image: /api/camera_proxy/camera.dahua4_sub
  32.         clickAction: /lovelace/kotek
  33.         actions:
  34.           - action: TURN_OFF_NOTIFICATIONS
  35.             title: Wyłącz powiadomienia
  36.           - action: DISMISS
  37.             title: Odrzuć
  38. mode: parallel
  39. max: 10
  40. ##############################################
  41. #automatyzacja do obsługi TURN_OFF_NOTIFICATIONS
  42. trigger:
  43. - platform: event
  44.   event_type: mobile_app_notification_action
  45.   event_data:
  46.     action: TURN_OFF_NOTIFICATIONS
  47. action:
  48. - service: automation.turn_off
  49.   target:
  50.     entity_id:
  51.    - automation.kotek_czeka_powiadomienie
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement