Thank you! Got the charger yesterday and up and running quickly thanks to you! (I had to upgrade firmware first)
Might I suggest to change these sensors as follows? That way you can track them in the Energy Dashboard!
- name: "Peblar Total Energy"
value_template: "{{ value_json.EnergyTotal }}"
device_class: "energy"
unit_of_measurement: "Wh"
state_class: "total"
- name: "Peblar Session Energy"
value_template: "{{ value_json.EnergySession }}"
unit_of_measurement: "Wh"
state_class: "total_increasing"
device_class: "energy"
Additionally, I for the slider, I prefer watts over Wh. However the API doc requires mA.
ChargeCurrentLimit integer
The maximum current per phase indicated towards the EV in milliAmpere by this API. Note that other factors can cause an even lower limit (e.g. thermal or dynamic load balancing).
However, somehow I have more feel with ‘3000’ watts then say 16000mA, so I did the following to have a better understanding with the limit:
rest_command:
set_charge_current_limit:
url: "http://192.168.2.128/api/wlac/v1/evinterface"
method: patch
headers:
Authorization: "X"
content_type: "application/json"
payload: >
{
"ChargeCurrentLimit": {{ (states('input_number.charge_current_limit') | float / 230 * 1000) | int }}
}
and:
input_number:
charge_current_limit:
name: "Charge Current Limit (Watts)"
initial: 3680 # Equivalent to 16000 mA at 230V (16000 mA * 230V / 1000 = 3680W)
min: 0
max: 3680 # Max value for 16000 mA at 230V
step: 100
unit_of_measurement: W
Adding my current dashboard:
I update the api based when the slider changes:
alias: Peblar change speed when changing input
description: ""
triggers:
- trigger: state
entity_id:
- input_number.charge_current_limit
conditions: []
actions:
- action: rest_command.set_charge_current_limit
metadata: {}
data: {}
mode: single
automations can be based on current tarrif, for example like this:
alias: Peblar Charge Current Limit - low
triggers:
- entity_id:
- input_boolean.peblar_charge_only_low_tarrif
trigger: state
from: "off"
to: "on"
- trigger: state
entity_id:
- sensor.zonneplan_current_tariff_group
to: low
conditions:
- condition: state
entity_id: input_boolean.peblar_charge_only_low_tarrif
state: "on"
- condition: not
conditions:
- condition: state
entity_id: sensor.zonneplan_current_tariff_group
state: Low
actions:
- action: input_number.set_value
metadata: {}
data:
value: 3400
target:
entity_id: input_number.charge_current_limit