DomJo
(Dominik Jonzyk)
November 18, 2020, 12:57pm
1
can someone explain to me why my automation is not working.
When I put the trigger in the developer tool it shows “true”
If I release the trigger manually, I get an email.
- id: '1605697247760'
alias: batterie test
description: ''
trigger:
- platform: template
value_template: '{{ state_attr(''climate.az_heizung2'', ''battery'') | float <=
3.1 }}'
condition: []
action:
- service: notify.sendmail_battery
data:
message: Batterie leer :*
title: Batterie leer
mode: single
tom_l
November 18, 2020, 1:02pm
2
Because to trigger the template has to change from false to true. If it is always true it will never trigger.
1 Like
DomJo
(Dominik Jonzyk)
November 18, 2020, 1:09pm
3
ahh ok, then I’ll try if I can somehow fool him
thanx
tom_l
November 18, 2020, 1:54pm
4
Also you don’t need a template to do this since version 0.115, you can trigger on numeric attributes directly:
trigger:
- platform: numeric_state
entity_id: climate.az_heizung2
attribute: battery
below: 3.2 # same as <= 3.1
1 Like
DomJo
(Dominik Jonzyk)
November 18, 2020, 2:08pm
5
I tried that before. Of course that didn’t work either
tom_l
November 18, 2020, 2:52pm
6
Because of the same issue. It has to go from above 3.2 to below 3.2 for the trigger to activate. If it stays below 3.2 nothing will happen.
1 Like