bosch-thermostat / home-assistant-bosch-custom-component

HA custom component for Bosch thermostats
Apache License 2.0
206 stars 43 forks source link

Entity sensor.central_heating is using native unit of measurement 'm³' which is not a valid #334

Closed ngosang closed 8 months ago

ngosang commented 9 months ago

Describe the bug I see these messages in Home Assistant:

2023-10-11 14:08:44.941 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.central_heating (<class 'custom_components.bosch.sensor.energy.EnergySensor'>) is using native unit of measurement 'm³' which is not a valid unit for the device class ('energy') it is using; expected one of ['MWh', 'MJ', 'GJ', 'Wh', 'kWh']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/bosch-thermostat/home-assistant-bosch-custom-component/issues 2023-10-11 14:08:44.941 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.hot_water (<class 'custom_components.bosch.sensor.energy.EnergySensor'>) is using native unit of measurement 'm³' which is not a valid unit for the device class ('energy') it is using; expected one of ['MWh', 'MJ', 'GJ', 'Wh', 'kWh']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/bosch-thermostat/home-assistant-bosch-custom-component/issues

To Reproduce Steps to reproduce the behavior:

  1. Configure Junkers CT100 with NEFIT (other metrics are working fine from here)

Expected behavior No warning log

Version

pszafer commented 8 months ago

Fixed in the https://github.com/bosch-thermostat/home-assistant-bosch-custom-component/commit/3f34dcc16ad2c2b5af830abd810f58fa31f80ada

I'll release it in a few days