251 lines
8.0 KiB
YAML
Executable File
251 lines
8.0 KiB
YAML
Executable File
mqtt:
|
|
sensor:
|
|
- name: "Victron EVCS Status Raw"
|
|
unique_id: victron_evcs_status_raw
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/Status"
|
|
value_template: "{{ value_json.value }}"
|
|
icon: mdi:ev-station
|
|
|
|
- name: "Victron EVCS Mode Raw"
|
|
unique_id: victron_evcs_mode_raw
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/Mode"
|
|
value_template: "{{ value_json.value }}"
|
|
icon: mdi:tune
|
|
|
|
- name: "Victron EVCS Current"
|
|
unique_id: victron_evcs_current
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/Current"
|
|
value_template: "{{ value_json.value }}"
|
|
unit_of_measurement: "A"
|
|
state_class: measurement
|
|
icon: mdi:current-ac
|
|
|
|
- name: "Victron EVCS Set Current"
|
|
unique_id: victron_evcs_set_current_sensor
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/SetCurrent"
|
|
value_template: "{{ value_json.value }}"
|
|
unit_of_measurement: "A"
|
|
state_class: measurement
|
|
icon: mdi:current-ac
|
|
|
|
- name: "Victron EVCS Max Current"
|
|
unique_id: victron_evcs_max_current
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/MaxCurrent"
|
|
value_template: "{{ value_json.value }}"
|
|
unit_of_measurement: "A"
|
|
state_class: measurement
|
|
icon: mdi:current-ac
|
|
|
|
- name: "Victron EVCS Min Current"
|
|
unique_id: victron_evcs_min_current
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/MinCurrent"
|
|
value_template: "{{ value_json.value }}"
|
|
unit_of_measurement: "A"
|
|
state_class: measurement
|
|
icon: mdi:current-ac
|
|
|
|
- name: "Victron EVCS Charging Time Raw"
|
|
unique_id: victron_evcs_charging_time_raw
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/ChargingTime"
|
|
value_template: "{{ value_json.value }}"
|
|
unit_of_measurement: "s"
|
|
state_class: measurement
|
|
icon: mdi:timer-outline
|
|
|
|
- name: "Victron EVCS Connected Raw"
|
|
unique_id: victron_evcs_connected_raw
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/Connected"
|
|
value_template: "{{ value_json.value }}"
|
|
icon: mdi:connection
|
|
|
|
- name: "Victron EVCS Product Name"
|
|
unique_id: victron_evcs_product_name
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/ProductName"
|
|
value_template: "{{ value_json.value }}"
|
|
icon: mdi:ev-station
|
|
|
|
- name: "Victron EVCS Custom Name"
|
|
unique_id: victron_evcs_custom_name
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/CustomName"
|
|
value_template: "{{ value_json.value }}"
|
|
icon: mdi:rename-box
|
|
|
|
- name: "Victron EVCS Serial"
|
|
unique_id: victron_evcs_serial
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/Serial"
|
|
value_template: "{{ value_json.value }}"
|
|
icon: mdi:identifier
|
|
|
|
- name: "Victron EVCS Firmware Version"
|
|
unique_id: victron_evcs_firmware_version
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/FirmwareVersion"
|
|
value_template: "{{ value_json.value }}"
|
|
icon: mdi:chip
|
|
|
|
- name: "Victron EVCS Device Instance"
|
|
unique_id: victron_evcs_device_instance
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/DeviceInstance"
|
|
value_template: "{{ value_json.value }}"
|
|
icon: mdi:identifier
|
|
|
|
- name: "Victron EVCS AC Power"
|
|
unique_id: victron_evcs_ac_power
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/Ac/Power"
|
|
value_template: "{{ value_json.value }}"
|
|
unit_of_measurement: "W"
|
|
device_class: power
|
|
state_class: measurement
|
|
icon: mdi:flash
|
|
|
|
- name: "Victron EVCS L1 Power"
|
|
unique_id: victron_evcs_l1_power
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/Ac/L1/Power"
|
|
value_template: "{{ value_json.value }}"
|
|
unit_of_measurement: "W"
|
|
device_class: power
|
|
state_class: measurement
|
|
icon: mdi:flash
|
|
|
|
- name: "Victron EVCS L1 Energy Forward"
|
|
unique_id: victron_evcs_l1_energy_forward
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/Ac/L1/Energy/Forward"
|
|
value_template: "{{ value_json.value }}"
|
|
unit_of_measurement: "kWh"
|
|
device_class: energy
|
|
state_class: total_increasing
|
|
icon: mdi:lightning-bolt
|
|
|
|
binary_sensor:
|
|
- name: "Victron EVCS Device Connected"
|
|
unique_id: victron_evcs_device_connected
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/Connected"
|
|
value_template: "{{ value_json.value | int }}"
|
|
payload_on: "1"
|
|
payload_off: "0"
|
|
device_class: connectivity
|
|
icon: mdi:lan-connect
|
|
|
|
switch:
|
|
- name: "Victron EVCS Charging"
|
|
unique_id: victron_evcs_charging
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/StartStop"
|
|
value_template: "{{ value_json.value | int }}"
|
|
state_on: "1"
|
|
state_off: "0"
|
|
command_topic: "W/c0619ab34ac5/evcharger/40/StartStop"
|
|
payload_on: '{"value":1}'
|
|
payload_off: '{"value":0}'
|
|
icon: mdi:power
|
|
|
|
- name: "Victron EVCS Auto Start"
|
|
unique_id: victron_evcs_auto_start
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/AutoStart"
|
|
value_template: "{{ value_json.value | int }}"
|
|
state_on: "1"
|
|
state_off: "0"
|
|
command_topic: "W/c0619ab34ac5/evcharger/40/AutoStart"
|
|
payload_on: '{"value":1}'
|
|
payload_off: '{"value":0}'
|
|
icon: mdi:auto-fix
|
|
|
|
number:
|
|
- name: "Victron EVCS Set Current Command"
|
|
unique_id: victron_evcs_set_current_command
|
|
state_topic: "N/c0619ab34ac5/evcharger/40/SetCurrent"
|
|
value_template: "{{ value_json.value }}"
|
|
command_topic: "W/c0619ab34ac5/evcharger/40/SetCurrent"
|
|
command_template: '{"value": {{ value | int }}}'
|
|
min: 6
|
|
max: 32
|
|
step: 1
|
|
unit_of_measurement: "A"
|
|
mode: box
|
|
icon: mdi:current-ac
|
|
|
|
template:
|
|
- sensor:
|
|
- name: "Victron EVCS Status"
|
|
unique_id: victron_evcs_status
|
|
state: >
|
|
{% set v = states('sensor.victron_evcs_status_raw') | int(-1) %}
|
|
{% if v == 0 %}
|
|
EV déconnecté
|
|
{% else %}
|
|
Inconnu ({{ v }})
|
|
{% endif %}
|
|
icon: mdi:ev-station
|
|
|
|
- name: "Victron EVCS Mode"
|
|
unique_id: victron_evcs_mode_text
|
|
state: >
|
|
{% set v = states('sensor.victron_evcs_mode_raw') | int(-1) %}
|
|
{% if v == 0 %}
|
|
Manuel
|
|
{% elif v == 1 %}
|
|
Auto
|
|
{% elif v == 2 %}
|
|
Planifié
|
|
{% else %}
|
|
Inconnu ({{ v }})
|
|
{% endif %}
|
|
icon: mdi:tune
|
|
|
|
- name: "Victron EVCS Charging Time"
|
|
unique_id: victron_evcs_charging_time
|
|
state: >
|
|
{% set s = states('sensor.victron_evcs_charging_time_raw') | int(0) %}
|
|
{% set h = s // 3600 %}
|
|
{% set m = (s % 3600) // 60 %}
|
|
{% set sec = s % 60 %}
|
|
{% if h > 0 %}
|
|
{{ h }}h {{ m }}m
|
|
{% elif m > 0 %}
|
|
{{ m }}m {{ sec }}s
|
|
{% else %}
|
|
{{ sec }}s
|
|
{% endif %}
|
|
icon: mdi:timer-outline
|
|
|
|
- binary_sensor:
|
|
- name: "Victron EVCS Vehicle Connected"
|
|
unique_id: victron_evcs_vehicle_connected
|
|
# 16/10/2026 : un statut ILLISIBLE (le GX perd la borne ~0,2 s) garde
|
|
# l'etat precedent. Avant, `int(-1)` le transformait en -1, donc
|
|
# « branche » : 7 faux branchements d'une seconde du 08 au 15/10
|
|
# (questions du concierge, session de nuit ouverte 30 s le 15/10 01:30).
|
|
state: >
|
|
{% set raw = states('sensor.victron_evcs_status_raw') %}
|
|
{% if raw | is_number %}
|
|
{{ raw | int != 0 }}
|
|
{% else %}
|
|
{{ this.state == 'on' }}
|
|
{% endif %}
|
|
device_class: plug
|
|
icon: mdi:car-electric
|
|
|
|
script:
|
|
victron_evcs_mode_manuel:
|
|
alias: Victron EVCS Mode Manuel
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "W/c0619ab34ac5/evcharger/40/Mode"
|
|
payload: '{"value":0}'
|
|
|
|
victron_evcs_mode_auto:
|
|
alias: Victron EVCS Mode Auto
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "W/c0619ab34ac5/evcharger/40/Mode"
|
|
payload: '{"value":1}'
|
|
|
|
victron_evcs_mode_planifie:
|
|
alias: Victron EVCS Mode Planifié
|
|
sequence:
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: "W/c0619ab34ac5/evcharger/40/Mode"
|
|
payload: '{"value":2}'
|
|
|