Advertisement
calas

Esempio Netatmo per Nicola

May 13th, 2021
1,002
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.00 KB | None | 0 0
  1. - alias: net1
  2.   description: "Count all events pushed by the Netatmo API"
  3.   trigger:
  4.     - event_data: {}
  5.       event_type: netatmo_event
  6.       platform: event
  7.   action:
  8.     - service: persistent_notification.create
  9.       data_template:
  10.         notification_id: "prova1"
  11.         title: "Netatmo event"
  12.         message: "prova1"
  13.  
  14. - alias: Net2
  15.   description: 'Motion detected at home'
  16.   trigger:
  17.   - event_type: netatmo_event
  18.     platform: event
  19.     event_data:
  20.       type: movement # animal, vehicle
  21.   action:
  22.     - service: persistent_notification.create
  23.       data_template:
  24.         notification_id: "Netatmo"
  25.         title: "Netatmo event"
  26.         message: >
  27.         {% if is_state('persistent_notification.netatmo' , 'notifying') %}
  28.            {{ states.persistent_notification.netatmo.attributes.message }}
  29.                [{{ now().strftime('%H:%M') }}] - Movimento Rilevato
  30.          {% else %}
  31.                [{{ now().strftime('%H:%M') }}] - Movimento Rilevato
  32.          {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement