ygarti
(ygarti)
1
Hi
I am trying to make automation when battery_level is low send me notification
but my trigger isn’t working
- alias: battery stat
trigger:
platform: numeric_state
entity_id: binary_sensor.door_window_sensor_158d00023ee2e1
value_template: "{{ state.attributes.battery_level }}"
below: 42
can you please tell me what i did wrong
Thanks .
metbril
(Robert 🇳🇱🇪🇺)
2
You should test this in the template editor in the developer tools section. And read the templating documentation for some examples.
I think it should state something like
{{ states.binary_sensor.door_window_sensor_158d00023ee2e1.attributes.battery_level }}
joch
(Johnny)
3
steveK
(Stephan Kreilos)
4
Hello joch
Could you share your file again?
Or the solution?
Thank you
Pippyn
5
I would recommend the automatic creation of battery sensors using @NotoriousBDG’s package.
joch
(Johnny)
6
I would also recommend moving to https://github.com/notoriousbdg/Home-AssistantConfig/blob/master/packages/battery_alert.yaml (I did as well, however some work remaining to migrate these things to Lovelace).
steveK
(Stephan Kreilos)
7
Thank you!
I’ll give it a try
1 Like
joch
(Johnny)
8
1 Like