jonasbkarlsson / ev_smart_charging

Electric vehicle smart charging for Home Assistant.
MIT License
163 stars 25 forks source link

Wiki suggestion #312

Closed HolgerMiara closed 1 month ago

HolgerMiara commented 1 month ago

Hi @jonasbkarlsson,

I couldn't find a way to edit to the Wiki, but wanted to contribute to your Charger >> Easee page. Feel free to review below and add it to the bottom of the Easee page of your Wiki. =)

Automation to inform the integration that the EV is connected to the charger

The status sensor of the Easee integration can have the states disconnected, awaiting_start, charging, ready_to_charge, completed or error. The below automation is triggered every time the status of the sensor changes its state. Any other state than disconnected is being interpreted as a connected EV.

alias: EV Smart Charging - EV connection status
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.ehXXXXXX_status      (replace with your own charger ID)
condition: []
action:
  - if:
      - condition: state
        entity_id: sensor.ehXXXXXX_status      (replace with your own charger ID)
        state: disconnected
    then:
      - service: switch.turn_off
        data: {}
        target:
          entity_id: switch.ev_smart_charging_ev_connected
    else:
      - service: switch.turn_on
        data: {}
        target:
          entity_id: switch.ev_smart_charging_ev_connected
mode: single

HTH

jonasbkarlsson commented 1 month ago

Thanks! I have added your text.