25-02-2023, 01:34 PM
Bonjour, pour rapatrier les Topics dans HA, il faut les déclarer dans le fichier configuration.yaml en écrivant les lignes comme dans l'exemple qui suit :
# Sensors MQTT libres
mqtt:
sensor:
- name: "PWspecpower"
state_topic: "pwsolaire/sensor/specpower_W"
unit_of_measurement: "Wc"
device_class: power
- name: "PWPower"
state_topic: "pwsolaire/sensor/power_W"
unit_of_measurement: "W"
device_class: power
#value_template: '{{ payload }}'
- name: "PWCourant"
state_topic: "pwsolaire/sensor/courant_mA"
unit_of_measurement: "mA"
device_class: current
#value_template: '{{ payload }}'
- name: "PwTension"
state_topic: "pwsolaire/sensor/busvoltage_V"
unit_of_measurement: "V"
device_class: voltage
#value_template: '{{ payload }}'
- name: "PwTensionShunt"
state_topic: "pwsolaire/sensor/shuntvoltage_mV"
unit_of_measurement: "mv"
device_class: voltage
#value_template: '{{ payload }}'
- name: "PwTensionFiltrée"
state_topic: "pwsolaire/sensor/voltage_filtre_V"
unit_of_measurement: "V"
device_class: voltage
#value_template: '{{ payload }}'
# Sensors MQTT libres
mqtt:
sensor:
- name: "PWspecpower"
state_topic: "pwsolaire/sensor/specpower_W"
unit_of_measurement: "Wc"
device_class: power
- name: "PWPower"
state_topic: "pwsolaire/sensor/power_W"
unit_of_measurement: "W"
device_class: power
#value_template: '{{ payload }}'
- name: "PWCourant"
state_topic: "pwsolaire/sensor/courant_mA"
unit_of_measurement: "mA"
device_class: current
#value_template: '{{ payload }}'
- name: "PwTension"
state_topic: "pwsolaire/sensor/busvoltage_V"
unit_of_measurement: "V"
device_class: voltage
#value_template: '{{ payload }}'
- name: "PwTensionShunt"
state_topic: "pwsolaire/sensor/shuntvoltage_mV"
unit_of_measurement: "mv"
device_class: voltage
#value_template: '{{ payload }}'
- name: "PwTensionFiltrée"
state_topic: "pwsolaire/sensor/voltage_filtre_V"
unit_of_measurement: "V"
device_class: voltage
#value_template: '{{ payload }}'