# template for "Tesla stop when charged"
- alias: Tesla stop when charged
  trigger:
    - platform: template
      value_template: >
        {{ (states('sensor.snowywhite_battery')|float(0)) >=
           (states('number.snowywhite_charge_limit')|float(100)) }}
  action:
    - service: input_boolean.turn_off
      target:
        entity_id: input_boolean.tesla_manual_override
    - service: switch.turn_off
      target:
        entity_id: switch.home_charging
