# Home Assistant Charger

Source: https://docs.evcc.io/en/chargers/home-assistant-charger

Home Assistant instances in your network will be auto-discovered and suitable charger entities and services (e.g. `sensor.*`, `switch.*`, `number.*`) will be suggested.

Supported features: dim

## Parameters

| Name | Description | Default / example | |
| --- | --- | --- | --- |
| uri | Home Assistant URI | http://homeassistant.local:8123 |  |
| status | Charging status sensor Entity ID for charging status (A=ready, B=connected, C=charging) | sensor.charger_status |  |
| enabled | Enabled status sensor Entity ID for enabled state (`sensor`, `binary_sensor` or `switch` with `on`/`off` or `true`/`false` state) | binary_sensor.charger_enabled |  |
| enable | Enable switch Entity ID for enable/disable control (`switch` or `input_boolean`) | switch.charger_enable |  |
| setMaxCurrent | Maximum current entity [A] Entity ID for setting maximum current in amperes (`number` or `input_number` entity) | number.charger_max_current |  |
| insecure | Accept self-signed certificates |  | advanced |
| statusA | States for status A Comma-separated list of additional states meaning ready, see [docs.evcc.io](https://docs.evcc.io/en/smarthome/home-assistant#charge-status) | not_plugged, disconnected | advanced |
| statusB | States for status B Comma-separated list of additional states meaning connected, see [docs.evcc.io](https://docs.evcc.io/en/smarthome/home-assistant#charge-status) | charging_stopped, charging_completed | advanced |
| statusC | States for status C Comma-separated list of additional states meaning charging, see [docs.evcc.io](https://docs.evcc.io/en/smarthome/home-assistant#charge-status) | instant_charging, fast_charging | advanced |
| milliamps | 0.1A current steps Enable if the maximum current entity accepts fractional amperes; otherwise evcc sends whole amperes only |  | advanced |
| power | Power entity Entity ID for instantaneous power measurement in watts | sensor.charger_power | advanced |
| energy | Energy entity Entity ID for cumulative energy measurement in kWh | sensor.charger_energy | advanced |
| currentL1 | L1 current entity Entity ID for L1 current measurement in amperes | sensor.charger_current_l1 | advanced |
| currentL2 | L2 current entity Entity ID for L2 current measurement in amperes | sensor.charger_current_l2 | advanced |
| currentL3 | L3 current entity Entity ID for L3 current measurement in amperes | sensor.charger_current_l3 | advanced |
| voltageL1 | L1 voltage entity Entity ID for L1 voltage measurement in volts | sensor.charger_voltage_l1 | advanced |
| voltageL2 | L2 voltage entity Entity ID for L2 voltage measurement in volts | sensor.charger_voltage_l2 | advanced |
| voltageL3 | L3 voltage entity Entity ID for L3 voltage measurement in volts | sensor.charger_voltage_l3 | advanced |
| phaseswitch | Phase switching entity Entity ID for 1p/3p phase switching (select entity with options "1" and "3") | select.charger_phases | advanced |
| heating | Heating device Shows °C instead of % |  | advanced |
| integrateddevice | Integrated device Integrated device. No charging sessions |  | advanced |

## Configuration example for evcc.yaml

```yaml
chargers:
    - name: my_charger
      type: template
      template: homeassistant
      uri: http://homeassistant.local:8123 # Home Assistant URI
      status: sensor.charger_status # Charging status sensor, Entity ID for charging status (A=ready, B=connected, C=charging)
      enabled: binary_sensor.charger_enabled # Enabled status sensor, Entity ID for enabled state (`sensor`, `binary_sensor` or `switch` with `on`/`off` or `true`/`false` state)
      enable: switch.charger_enable # Enable switch, Entity ID for enable/disable control (`switch` or `input_boolean`)
      setMaxCurrent: number.charger_max_current # Maximum current entity [A], Entity ID for setting maximum current in amperes (`number` or `input_number` entity)
      insecure: # Accept self-signed certificates, optional
      statusA: not_plugged, disconnected # States for status A, Comma-separated list of additional states meaning ready, see [docs.evcc.io](https://docs.evcc.io/en/smarthome/home-assistant#charge-status) (optional)
      statusB: charging_stopped, charging_completed # States for status B, Comma-separated list of additional states meaning connected, see [docs.evcc.io](https://docs.evcc.io/en/smarthome/home-assistant#charge-status) (optional)
      statusC: instant_charging, fast_charging # States for status C, Comma-separated list of additional states meaning charging, see [docs.evcc.io](https://docs.evcc.io/en/smarthome/home-assistant#charge-status) (optional)
      milliamps: # 0.1A current steps, Enable if the maximum current entity accepts fractional amperes; otherwise evcc sends whole amperes only (optional)
      power: sensor.charger_power # Power entity, Entity ID for instantaneous power measurement in watts (optional)
      energy: sensor.charger_energy # Energy entity, Entity ID for cumulative energy measurement in kWh (optional)
      currentL1: sensor.charger_current_l1 # L1 current entity, Entity ID for L1 current measurement in amperes (optional)
      currentL2: sensor.charger_current_l2 # L2 current entity, Entity ID for L2 current measurement in amperes (optional)
      currentL3: sensor.charger_current_l3 # L3 current entity, Entity ID for L3 current measurement in amperes (optional)
      voltageL1: sensor.charger_voltage_l1 # L1 voltage entity, Entity ID for L1 voltage measurement in volts (optional)
      voltageL2: sensor.charger_voltage_l2 # L2 voltage entity, Entity ID for L2 voltage measurement in volts (optional)
      voltageL3: sensor.charger_voltage_l3 # L3 voltage entity, Entity ID for L3 voltage measurement in volts (optional)
      phaseswitch: select.charger_phases # Phase switching entity, Entity ID for 1p/3p phase switching (select entity with options "1" and "3") (optional)
      heating: # Heating device, Shows °C instead of % (optional)
      integrateddevice: # Integrated device, Integrated device. No charging sessions (optional)
```
