I have a EV charger, and decided to integrate it using this topic.
Below is the start for some basics, I’ll map out the rest later.
For now, 1 switch for charging and 1 select for the mode, and 1 sensor if the car is connected
Selects:
select:
- name: "Ev charger Mode"
unique_id: victron_ev charger
object_id: victron_ev charger
options:
- Auto
- Manual
- Scheduled charge
state_topic: "victron/N/xxx/evcharger/40/Mode"
value_template: >
{% if value_json.value == 0 %}
Manual
{% elif value_json.value == 1 %}
Auto
{% elif value_json.value == 2 %}
Scheduled charge
{% endif %}
command_topic: "victron/W/xxx/evcharger/40/Mode"
command_template: >
{% set value_map = {
"Manual": 0,
"Auto": 1,
"Scheduled charge": 2,
}
%}
{ "value": {{ value_map[value] }}}
device:
{
identifiers: ["Victron Cerbo GX"],
manufacturer: "Victron Energy",
model: "Cerbo GX",
name: "Cerbo GX",
}
Sensors:
sensor:
- name: Ev charger connected
unique_id: victron_ev charger connected
object_id: victron_ev charger connected
name: "Ev charger connected"
state_topic: "victron/N/xxx/evcharger/40/Connected"
value_template: >
{% if value_json.value == 0 %}
No
{% elif value_json.value == 1 %}
Yes
{% else %}
Error - No Data
{% endif %}
device: {
identifiers: [
"Victron Cerbo GX"
],
manufacturer: "Victron Energy",
model: "Cerbo GX",
name: "Cerbo GX"}
- name: "Ev charger current"
unique_id: victron_ev charger current
object_id: victron_ev charger current
state_class: measurement
device_class: current
unit_of_measurement: A
icon: mdi:current-dc
state_topic: "victron/N/xxx/evcharger/40/Current"
value_template: "{{ value_json.value | round(2) }}"
device: {
identifiers: [
"Victron Cerbo GX"
],
manufacturer: "Victron Energy",
model: "Cerbo GX",
name: "Cerbo GX"}
- name: "Ev charger max current"
unique_id: victron_ev charger max current
object_id: victron_ev charger max current
state_class: measurement
device_class: current
unit_of_measurement: A
icon: mdi:current-dc
state_topic: "victron/N/c0619ab33324/evcharger/40/MaxCurrent"
value_template: "{{ value_json.value | round(2) }}"
device:
{
identifiers: ["Victron Cerbo GX"],
manufacturer: "Victron Energy",
model: "Cerbo GX",
name: "Cerbo GX",
}
switch:
- name: "Ev charger charge"
unique_id: victron_ev charger charge
object_id: victron_ev charger charge
command_topic: "victron/W/xxx/evcharger/40/StartStop"
payload_on: '{"value": 1}'
payload_off: '{"value": 0}'
state_topic: "victron/N/xxx/evcharger/40/StartStop"
value_template: "{{ value_json.value | int }}"
state_on: "1"
state_off: "0"
device:
{
identifiers: ["Victron Cerbo GX"],
manufacturer: "Victron Energy",
model: "Cerbo GX",
name: "Cerbo GX",
}
Number
number:
- name: "Ev charger set current"
unique_id: victron_ev charger set current
object_id: victron_ev charger set current
device_class: current
unit_of_measurement: A
icon: mdi:current-dc
min: 6
max: 32
step: 1
mode: box
state_topic: "victron/N/xxx/evcharger/40/SetCurrent"
command_topic: "victron/W/xxx/evcharger/40/SetCurrent"
command_template: '{"value": {{ value }} }'
value_template: "{{ value_json.value | round(2) }}"
device: {
identifiers: [
"Victron Cerbo GX"
],
manufacturer: "Victron Energy",
model: "Cerbo GX",
name: "Cerbo GX"}