Closed bsauve closed 5 months ago
je finiavec un autre bug et je vous reviens
Moi j'ai un template sensor comme ceci
- sensor:
- name: "watt_chauffe_eau"
unit_of_measurement: 'W'
device_class: power
state_class: measurement
unique_id: sensor.watt_chauffe_eau
state: "{{ state_attr('switch.neviweb130_switch_calypso_chauffe_eau', 'Wattage_instant') }}"
le unit_of_measurement est W mais tu peux aussi mettre KW
Merci, je crois que le device _class qui était à energy causait le problème.
Alors tout est beau
Bonjour, j'avais ce qui suit dans mon configuration.yaml afin de voir un graphique dans mon Dashboard. Et ça fonctionnait. Mais plus maintenant. Et je n'arrive pas à trouver quoi mettre comme "unit_of_measurement" et "state_class" malgré le message du log qui devrait me guider.
En fait le graphique semble fonctionner mais j'ai le message dans le log.
template:
sensor:
name: "tank_wattage_instant" unit_of_measurement: 'kWh' device_class: energy state_class: measurement state: "{{ state_attr('switch.neviweb130_switch_chauffe_eau', 'Wattage_instant') }}"
name: "tank_hourly_kwh" unit_of_measurement: 'kWh' device_class: energy state_class: measurement state: "{{ state_attr('switch.neviweb130_switch_chauffe_eau', 'hourly_kwh') }}"
Voici le message du log:
The unit of sensor.tank_wattage_instant (kWh) cannot be converted to the unit of previously compiled statistics (KW). Generation of long term statistics will be suppressed unless the unit changes back to KW or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this The unit of sensor.tank_hourly_kwh (kWh) cannot be converted to the unit of previously compiled statistics (KWh). Generation of long term statistics will be suppressed unless the unit changes back to KWh or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this