Advertisement
314ma

Low battery level

May 12th, 2020
331
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.47 KB | None | 0 0
  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 }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement