davidrapan / ha-solarman

⚡ Solarman Stick Logger integration for 🏠 Home Assistant
MIT License
115 stars 25 forks source link

Component using native unit of measurement #138

Closed Soltinioo closed 2 months ago

Soltinioo commented 2 months ago

Describe the bug using native unit of measurement

Attach the debug log 'Rejestrator: homeassistant.components.sensor Źródło: components/sensor/init.py:569 integracja: Sensor (dokumentacja, Problemy) Pierwsze zdarzenie: 15:14:13 (1 zdarzenia) Ostatnio zalogowany: 15:14:13

Entity sensor.falownik_deye_output_active_power (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total', 'total_increasing'; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues'

'Rejestrator: homeassistant.components.sensor Źródło: components/sensor/init.py:731 integracja: Sensor (dokumentacja, Problemy) Pierwsze zdarzenie: 15:14:13 (2 zdarzenia) Ostatnio zalogowany: 15:14:13

Entity sensor.falownik_deye_output_active_power (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using native unit of measurement 'W' which is not a valid unit for the device class ('energy') it is using; expected one of ['MWh', 'Wh', 'kWh', 'GJ', 'MJ']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues Entity sensor.falownik_deye_output_reactive_power (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using native unit of measurement 'VAR' which is not a valid unit for the device class ('reactive_power') it is using; expected one of ['var']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues'

Version: lastest

I use deye string

davidrapan commented 2 months ago

Hi @Soltinioo, thanks for the report it will be fixed promptly. 😉

davidrapan commented 2 months ago

Fixed in fix: Minor bugs in inverter profiles and is part of v24.09.08

Soltinioo commented 2 months ago

Hi. one error not corrected and is in the logs

'Rejestrator: homeassistant.components.sensor Źródło: components/sensor/init.py:731 integracja: Sensor (dokumentacja, Problemy) Pierwsze zdarzenie: 09:25:25 (1 zdarzenia) Ostatnio zalogowany: 09:25:25

Entity sensor.falownik_deye_output_reactive_power (<class 'custom_components.solarman.sensor.SolarmanSensor'>) is using native unit of measurement 'VAR' which is not a valid unit for the device class ('reactive_power') it is using; expected one of ['var']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/davidrapan/ha-solarman/issues'

davidrapan commented 2 months ago

fix: Incorrect entity descriptions: state_class

frsantos commented 2 months ago

Hey @davidrapan A couple of things:

gedger commented 2 months ago

From my understanding the total_increasing can be reset to zero but it doesn't have to be, so continuously increasing for ever is OK too. If your inverter failed and was replaced then this would go to zero which is one of the use cases mentioned.

frsantos commented 2 months ago

OK, this is more up to date: https://developers.home-assistant.io/blog/2021/09/20/state_class_total/

davidrapan commented 2 months ago

fix: Incorrect entity descriptions: state_class

davidrapan commented 2 months ago

When I looked into it the total is intended for net meters which can also go into negative numbers.

frsantos commented 2 months ago

When I looked into it the total is intended for net meters which can also go into negative numbers.

Yes, sorry, the first blog post was misleading to me.

davidrapan commented 2 months ago

Yes, sorry, the first blog post was misleading to me.

Yeah I had the same issue before.