Hello guys,
I’m trying to get my phone battery to last a bit longer, so I created an automation that automatically turns my charger off when it reaches the required battery percentage.
Now I also want to create a trigger that turns the charger on when my battery percentage dips below the required percentage - 10%. What am I doing wrong?
trigger:
- platform: numeric_state
entity_id: sensor.phone_battery_level
above: input_number.phone_requested_battery_level
- platform: template
value_template: >-
{% if ( states( 'sensor.phone_battery_level' ) | float) < ( states(
'input_number.phone_requested_battery_level' ) - 10| float ) %}true {% endif
%}
The first trigger is working as expected, the second template trigger is not triggering.