314ma

open_cover_5m_before_alarm

Aug 19th, 2020
108
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - alias: open_cover_5m_before_alarm
  2.   trigger:
  3.     - platform: template
  4.       value_template: "{{ (state_attr('sensor.mobile_app_next_alarm', 'Time in Milliseconds')/1000 - strptime(states('sensor.date_time'), '%Y-%m-%d, %H:%M') | as_timestamp()) == 5*60 }}"
  5.   action:
  6.     - service: cover.open_cover
  7.       entity_id: cover.bedroom
RAW Paste Data