Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.50 KB | None | 0 0
  1. ##########################################################################################
  2. # Prima automazione
  3. ##########################################################################################
  4.   - alias: Accesso fallito
  5.     initial_state: 'on'
  6.     trigger:
  7.     - platform: event
  8.       event_type: call_service
  9.       event_data:
  10.         domain: persistent_notification
  11.         service: create
  12.     ###### forse qualcosa da mettere qua :D
  13.     #condition:
  14.     #  condition: template
  15.     #  value_template: "{{ trigger.to_state.state != off }}"
  16.     action:
  17.     - service: notify.pushover
  18.       data_template:
  19.         title: Accesso Fallito!
  20.         message: "messaggio"
  21.  
  22. ##########################################################################################
  23. # Seconda che va in conflitto, dove compare il titolo della prima e il messaggio della seconda
  24. ##########################################################################################
  25. - alias: Allarme batteria
  26.   initial_state: true
  27.   trigger:
  28.     - platform: time
  29.       at: '20:03:00'
  30.   condition:
  31.     - condition: template
  32.       value_template: >
  33.          ...
  34.   action:
  35.     - service: persistent_notification.create
  36.       data_template:
  37.         title: Attenzione! Batterie sotto la soglia impostata
  38.         notification_id: low-battery-alert
  39.         message: >
  40.          ...
  41.     - service: notify.telegram
  42.       data_template:
  43.         title: "Attenzione! Batterie sotto la soglia impostata"
  44.         message: >
  45.          ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement