MyElectricalData / myelectricaldata_import

125 stars 34 forks source link

[BUG] - warning dans logs Home Assistant #505

Closed Gandulf78 closed 2 months ago

Gandulf78 commented 4 months ago

Description du bug Warning dans les logs Home Assistant.

2024-02-28 14:33:57.969 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.linky_xxx_hc_consumption_cost (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'EURO' which is not a valid unit for the device class ('energy') it is using; expected one of ['GJ', 'MJ', 'kWh', 'Wh', 'MWh']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22 2024-02-28 14:33:57.970 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.linky_xxx_hp_consumption_cost (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'EURO' which is not a valid unit for the device class ('energy') it is using; expected one of ['GJ', 'MJ', 'kWh', 'Wh', 'MWh']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22

Configuration (config.yaml) ```yaml cycle: 14400 # 4H debug: true log2file: false wipe_influxdb: false tempo: enable: false price_blue_hc: 0.1464 price_blue_hp: 0.2460 price_red_hc: 0.2460 price_red_hp: 0.7324 price_white_hc: 0.1464 price_white_hp: 0.2460 home_assistant: enable: true discovery: true discovery_prefix: homeassistant home_assistant_ws: enable: true ssl: true purge: false token: xxxx url: homeassistant.mydomain.fr influxdb: enable: true hostname: influxdb port: 8086 token: xxxx org: Personal bucket: myelectricaldata method: batching batching_options: batch_size: 1000 flush_interval: 1000 jitter_interval: 0 retry_interval: 5000 max_retry_time: 180_000 max_retries: 5 max_retry_delay: 125_000 exponential_base: 2 mqtt: enable: true hostname: host.docker.internal port: 1883 username: xxx password: xxxx prefix: myelectricaldata client_id: myelectricaldata retain: true qos: 0 myelectricaldata: "xxxx": enable: 'true' token: xxxx name: "Maison" addresses: 'true' cache: 'true' consumption: 'true' consumption_detail: 'true' consumption_price_base: '0.2516' consumption_price_hc: "0.1704" consumption_price_hp: "0.27" consumption_max_date: "2022-04-01" consumption_detail_max_date: "2022-04-01" offpeak_hours_0: 20H00-8H00;13H00-18H00 # LUNDI offpeak_hours_1: 20H00-8H00;13H00-18H00 # MARDI offpeak_hours_2: 20H00-8H00;13H00-18H00 # MERCREDI offpeak_hours_3: 20H00-8H00;13H00-18H00 # JEUDI offpeak_hours_4: 20H00-8H00;13H00-18H00 # VENDREDI offpeak_hours_5: 22H00-6H00;12H00-14H00 # SAMEDI offpeak_hours_6: 20H00-8H00;13H00-18H00 # DIMANCHE plan: HC/HP production: 'false' production_detail: 'false' production_price: '0.0' production_max_date: "2022-04-01" production_detail_max_date: "2022-04-01" refresh_addresse: 'false' refresh_contract: 'false' ```

Type d'installation

Version : 0.13.0-rc.1

m4dm4rtig4n commented 4 months ago

Je viens de changer le device_class des sensor en "monetary". Ca arrivera avec la 0.13.0-RC.2

m4dm4rtig4n commented 2 months ago

@Gandulf78 tu as pu tester le fix ?

Gandulf78 commented 2 months ago

Oui, c'est corrigé. Merci.