Advertisement
madmicio

imposta sveglia pioggia

May 30th, 2019
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. - alias: imposta sveglia pioggia
  2. initial_state: 'on'
  3. trigger:
  4. - platform: time
  5. at: '06:50:00'
  6. condition:
  7. condition: and
  8. conditions:
  9. - condition: template
  10. value_template: '{{ (as_timestamp(states.sensor.next_alarm.state) | timestamp_custom("%H:%M")) > ("08:00")
  11. and (as_timestamp(states.sensor.next_alarm.state) | timestamp_custom("%H:%M")) < ("09:00")
  12. and ((as_timestamp(now()) | int) | timestamp_custom("%Y-%m-%d")) == (as_timestamp(states.sensor.next_alarm.state) | timestamp_custom("%Y-%m-%d")) }}'
  13. - condition: numeric_state
  14. entity_id: sensor.stato_pioggia
  15. above: 1
  16. action:
  17. - service: notify.pushbullet
  18. data:
  19. title: "invio al mio honor 10"
  20. message: "imposta sveglia"
  21. target: device/HUAWEI COL-L29
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement