314ma

Low battery level

May 12th, 2020
125
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. trigger:
  2.   - platform: event
  3.     event_type: state_changed
  4. condition:
  5.   - condition: template
  6.     value_template: '{{ "_battery_level" in trigger.event.data.entity_id }}'
  7.   - condition: template
  8.     value_template: '{{ trigger.event.data.new_state.state | int < 10 }}'
  9. action:
  10.   - service: notify.mobile_app_sm_n960f
  11.     data_template:
  12.       title: Wymiana baterii
  13.       message: "Czas na zmianę baterii w {{ trigger.event.data.new_state.attributes.friendly_name }}"
RAW Paste Data