dvd-dev / hilo

Home Assistant Hilo Integration via HACS
MIT License
122 stars 26 forks source link

Error while setting up utility_meter platform for sensor #398

Closed Frazou1 closed 3 months ago

Frazou1 commented 3 months ago

Version of the custom_component

Configuration

Add your logs here.

Describe the bug

J'ai cette erreur qui arrive dans les logs de home assistant et elle se repete pour toutes les entity HILO que j'ai.

Debug log


KeyError: 'thermostat_parent_hilo_energy'
2024-03-18 13:29:04.204 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up utility_meter platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 350, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/usr/src/homeassistant/homeassistant/components/utility_meter/sensor.py", line 239, in async_setup_platform
    conf_meter_source = hass.data[DATA_UTILITY][meter][CONF_SOURCE_SENSOR]
                        ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^

2024-03-18 13:30:10.540 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.hilo_energy_total (kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-03-18 13:30:10.540 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.hilo_energy_switch00 (kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-03-18 13:30:10.540 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.hilo_energy_switch01 (kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-03-18 13:30:10.541 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.hilo_energy_thermostat_parent (kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-03-18 13:30:10.541 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.hilo_energy_thermostat_rosalie (kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-03-18 13:30:10.541 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.hilo_energy_thermostat_gars (kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-03-18 13:30:10.541 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.hilo_energy_thermostat_salon (kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-03-18 13:30:10.542 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.hilo_energy_thermostat_garderie (kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-03-18 13:30:10.542 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.hilo_energy_unknown_source_tracker (kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-03-18 13:30:10.542 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.hilo_energy_total_medium (kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-03-18 13:30:10.542 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.hilo_energy_total_low (kWh) cannot be converted to the unit of previously compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2024-03-18 13:30:18.034 ERROR (MainThread) [homeassistant.helpers.entity] Failed to set state for sensor.hp_ilo_server_health, fall back to unknown
ic-dev21 commented 3 months ago

Salut, quelle version du component utilises-tu?

Peux-tu vérifier si tu as des entités qui ont _hilo_energy en suffixe? C'est du à la migration avec les unique id, je pense avoir merdé dans le temps. Sera fixed bientôt.

Frazou1 commented 3 months ago

Bon j'arrive pas a trouvé la version mais lorsque je clique sur Hilo dans HA ca me donne ca : image et sinon effectivement ils sont tous en suffixe

ic-dev21 commented 3 months ago

As-tu eu besoin de te logger sur le site de Hilo pour l'utiliser? Sinon tu vas avoir la version dans le fichier manifest.json

Frazou1 commented 3 months ago

Bingo : "requirements": ["python-hilo>=2024.3.1"], "version": "2024.3.2"

ic-dev21 commented 3 months ago

Bingo : "requirements": ["python-hilo>=2024.3.1"], "version": "2024.3.2"

Thanks!

Si tu vas faire un tour dans l'onglet developper tools --> statistics tu devais avoir une batch de fix issue disponibles. Fais ça et ça devrait rentrer dans l'ordre.

Tu peux te référer au wiki ici: https://github.com/dvd-dev/hilo/wiki/Comment-générer-les-compteurs-d'énergie

Frazou1 commented 3 months ago

Merci beaucoup ! :)