Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 52 additions & 2 deletions docs/car-charging.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ So it does not turn on **binary_sensor.predbat_car_charging_slot**, and an autom
With Octopus Intelligent charging a charge outside a dispatch does not get the cheap rate either.<BR>
A car charging outside any charging slot is also modelled in the plan at **input_number.predbat_car_charging_rate** until the end of the current plan slot (**plan_interval_minutes**, 30 minutes by default), so no export is planned over it. With **switch.predbat_metric_dynamic_load_adjust** On its load is also taken out of the recent-load estimate, so it is not counted twice - see [Dynamic Load Adjust](customisation.md#scaling-and-weight-options).<BR>
Leave it commented out if you have no sensor that reports the car actually drawing power.
The Ohme (`ohme_automatic`), myenergi Zappi (`myenergi_automatic`), Wallbox (`wallbox_automatic`) and Predbat gateway integrations set it for you, unless you have set it yourself in `apps.yaml`.
The Ohme (`ohme_automatic`), myenergi Zappi (`myenergi_automatic`) and Wallbox (`wallbox_automatic`) integrations set it for you, unless you have set it yourself in `apps.yaml`. The Predbat gateway integration sets it too, replacing any value of your own.

- **car_charging_now_response** - Set to the range of positive responses for car_charging_now to indicate that the car is charging. Useful if you have a sensor for your car charger that isn't binary.
The sensor's state must match one of these exactly (ignoring case). If unset it defaults to `yes`, `on`, `enable`, `true` and `charging`, which covers on/off sensors and chargers whose status reads `Charging`, such as a myenergi Zappi's plug status.
Expand Down Expand Up @@ -256,11 +256,61 @@ If you have [multiple electric cars](#multiple-electric-cars) then car_charging_

Multiple cars can be planned with Predbat, in which case you should set **num_cars** in `apps.yaml` to the number of cars you want to plan.

- **car_charging_limit**, **car_charging_planned**, **car_charging_battery_size** and **car_charging_soc** must then be a list of values (i.e. 2 entries for 2 cars)
- **car_charging_limit**, **car_charging_planned**, **car_charging_battery_size** and **car_charging_soc** must then be a list of values (i.e. 2 entries for 2 cars), and so should **car_charging_now** if you set it

- Each car will have its own Home Assistant slot sensor created e.g. **binary_sensor.predbat_car_charging_slot_1**,
SoC planning sensor e.g **predbat.car_soc_1** and **predbat.car_soc_best_1** for car 1

#### One charger shared by more than one car

A single charger sensor listed for both cars shows both cars as plugged in (in **car_charging_planned**) or charging (in **car_charging_now**) whenever either one is.
With **car_charging_exclusive** set to `true` Predbat then plans only one of them, but it goes through the cars in order, so it plans car 0 whenever car 0 has charging to plan, whichever car is actually on the charger.

This applies to a charger whose car settings you set yourself in `apps.yaml` - not one set up by Predbat's own charger integrations (Ohme, myenergi, Wallbox, GivEnergy Gateway or GivEnergy Cloud EV charger), whose automatic setup and charger control assume one car per charger.

To fix it, tell Predbat which car is on the charger, and give each car its own sensors that follow the charger only while that car is the one on it (keep **car_charging_exclusive** set to `true` as well).
For example, with an `input_select` helper of your own, with options `Car 0`, `Car 1` and `None`, which you or an automation set to the car on the charger:

```yaml
template:
- sensor:
# Use the same unit as your charger's power sensor: "kW" if it is in kW, which Predbat converts
- name: "Car 0 charging power"
unit_of_measurement: "W"
device_class: power
availability: "{{ has_value('input_select.car_on_charger') and (not is_state('input_select.car_on_charger', 'Car 0') or has_value('sensor.your_charger_power')) }}"
state: "{{ states('sensor.your_charger_power') if is_state('input_select.car_on_charger', 'Car 0') else 0 }}"
- name: "Car 1 charging power"
unit_of_measurement: "W"
device_class: power
availability: "{{ has_value('input_select.car_on_charger') and (not is_state('input_select.car_on_charger', 'Car 1') or has_value('sensor.your_charger_power')) }}"
state: "{{ states('sensor.your_charger_power') if is_state('input_select.car_on_charger', 'Car 1') else 0 }}"
- binary_sensor:
# Use your charger's plugged-in sensor; with a status sensor instead, test for its "no car" state,
# e.g. has_value('sensor.your_charger_status') and not is_state('sensor.your_charger_status', 'Disconnected')
- name: "Car 0 plugged in"
state: "{{ is_state('input_select.car_on_charger', 'Car 0') and is_state('binary_sensor.your_charger_plugged_in', 'on') }}"
- name: "Car 1 plugged in"
state: "{{ is_state('input_select.car_on_charger', 'Car 1') and is_state('binary_sensor.your_charger_plugged_in', 'on') }}"
```

```yaml
car_charging_now:
- sensor.car_0_charging_power
- sensor.car_1_charging_power
car_charging_planned:
- binary_sensor.car_0_plugged_in
- binary_sensor.car_1_plugged_in
car_charging_exclusive:
- true
- true
```

The `availability` lines matter with Octopus Intelligent: the [dispatch check](#checking-intelligent-dispatches-against-the-car) treats an unavailable sensor as no evidence, but a definite 0W as the car not charging.

With Octopus Intelligent, this works when each car is enrolled separately with its own **octopus_intelligent_slot** entry (see [below](#multiple-cars-with-octopus-intelligent-go-iog)).
When only the charger is enrolled, its dispatches belong to the car whose **octopus_intelligent_slot** entry it is, normally car 0. While the other car is selected, the enrolled car reads 0W, so Predbat can cancel the dispatch - and with **switch.predbat_octopus_intelligent_ignore_unplugged** On it also reads as unplugged, so the dispatch is ignored. This recipe does not suit that setup.

### Multiple cars with Octopus Intelligent Go (IOG)

If you have **two or more EVs enrolled in Octopus Intelligent Go**, Predbat can track the scheduled dispatch slots for each car independently.
Expand Down
30 changes: 29 additions & 1 deletion docs/devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

This section of the documentation describes the configuration required for different 3rd party devices/integrations, typically EV chargers. If you have a device not listed then please raise a GitHub ticket with your configuration.

## Telling Predbat the car is charging now

Where a charger below has a **car_charging_now** example, it tells Predbat when the car is actually drawing power, so Predbat can hold the house battery for the car while it charges, including a charge you start by hand.
See [car_charging_now](car-charging.md#planned-car-charging) for the kinds of sensor it accepts (on/off, a charger status, or a charging power) and when the hold applies.
If your charger is not listed, look on its device page in Home Assistant for one of these, and check its history while the car charges.

**car_charging_now_response** and **car_charging_planned_response** are each one list for every car. Predbat uses its built-in default only when you have not set a list. If an example below sets one, merge that example's values into your list (or into the default, `yes`, `on` and `true` among them) rather than replacing it, so your other cars' sensors still match.

If more than one car uses the same charger, see [One charger shared by more than one car](car-charging.md#one-charger-shared-by-more-than-one-car).

## Hypervolt

<https://github.com/gndean/home-assistant-hypervolt-charger>
Expand Down Expand Up @@ -105,6 +115,17 @@ Home Assistant 2026.8.0 removed the Ohme integration's `energy` sensor entirely
- "pending_approval"
```

**Determine if the car is charging now**

The status sensor reads `charging` while the car draws power, which the default **car_charging_now_response** accepts:

```yaml
car_charging_now:
- "sensor.ohme_{ohme_name}_status"
```

If you use [Ohme Direct](car-charging.md#ohme-car-charger-direct-integration) instead (`ohme_automatic`), leave this entry out: Predbat then uses its own Ohme power sensor, but an entry you have set yourself takes its place.

**Octopus Intelligent GO**

Replace XXX with your device ID which can be found by going to 'Settings' / 'Developer Tools' / 'Actions' then selecting 'Ohme: List Charge Slots'
Expand Down Expand Up @@ -295,9 +316,16 @@ Can be used both for the Car Charging Hold feature (to filter out previous car c
```yaml
car_charging_energy: 're:sensor.myenergi_zappi_[0-9a-z]+_charge_added_session'
car_charging_planned:
- 're:sensor.myenergi_zappi_[0-9a-z]+_plug_status)'
- 're:(sensor.myenergi_zappi_[0-9a-z]+_plug_status)'
car_charging_now:
- 're:(sensor.myenergi_zappi_[0-9a-z]+_plug_status)'
```

The plug status reads `Charging` while the car draws power, which the default **car_charging_now_response** accepts. (Predbat's own myenergi integration uses the Zappi's charging power instead, where 200W or more counts as charging.)
Make sure your **car_charging_planned_response** list includes `ev ready to charge` (plugged in but paused): most inverter templates list it, but the default `apps.yaml` does not.
A `re:` expression resolves to a single matching entity, and which one is not predictable, so with more than one Zappi give each car the full entity name of its own Zappi's sensor instead, and list every Zappi's session sensor under **car_charging_energy** (their energy is added together).
If you use Predbat's own [myenergi integration](components.md#myenergi-myenergi) with `myenergi_automatic` on (the default), it sets these for you, so remove these lines - a **car_charging_now** you leave set is used in place of the integration's own power sensor.

_TIP:_ The Zappi must be set to Eco+ mode for IOG to control it.
If Predbat starts exporting your battery (e.g. prior to the IOG cheap overnight period) then the Zappi can treat the exported energy as excess solar and start charging the EV battery with it!<BR>
To prevent this happening, in the Zappi configuration set the Export Margin to 8000W so that the Zappi will only charge the EV from excess solar when more than 8000W is being exported (which should never happen).
Loading