diff --git a/include/automations/tesla_charge_failsafe.yaml b/include/automations/tesla_charge_failsafe.yaml index d19fcd0..80aa15b 100644 --- a/include/automations/tesla_charge_failsafe.yaml +++ b/include/automations/tesla_charge_failsafe.yaml @@ -10,10 +10,12 @@ false {% endif %} condition: - - condition: numeric_state - entity_id: sensor.tesla_kwh_needed - above: 0 - value_template: "{{ states('sensor.tesla_kwh_needed')|float(0) }}" + - condition: template + value_template: > + {{ + states('sensor.snowywhite_battery') | float(0) + < states('number.snowywhite_charge_limit') | float(100) + }} action: - service: switch.turn_on target: