Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: wrong parameter at state class #1137

Open
steps56 opened this issue Nov 18, 2024 · 1 comment
Open

[Bug]: wrong parameter at state class #1137

steps56 opened this issue Nov 18, 2024 · 1 comment
Labels
bug Something isn't working solax

Comments

@steps56
Copy link

steps56 commented Nov 18, 2024

Describe the bug

Logger: homeassistant.components.sensor
Quelle: components/sensor/init.py:571
Integration: Sensor (Dokumentation, Probleme)
Erstmals aufgetreten: 11:33:44 (1 Vorkommnisse)
Zuletzt protokolliert: 11:33:44

Entity sensor.solax_remaining_battery_capacity (<class 'custom_components.solax_modbus.sensor.SolaXModbusSensor'>) 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/wills106/homsassistant-solax-modbus/issues

Integration Version

newest

Homeassistant core version

newest

Inverter brand

SolaX G3 Hyb

Plugin used

plugin_solax.py

Serial prefix

unnecessary here

Inverter firmware versions

35 9 36

Connection Method

SolaX Lan/Wlan Dongle

Dongle firmware

3.0

Detailed Error Log

__Logger: homeassistant.components.sensor
Quelle: components/sensor/init.py:571
Integration: Sensor (Dokumentation, Probleme)
Erstmals aufgetreten: 11:33:44 (1 Vorkommnisse)
Zuletzt protokolliert: 11:33:44

Entity sensor.solax_remaining_battery_capacity (<class 'custom_components.solax_modbus.sensor.SolaXModbusSensor'>) 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/wills106/homsassistant-solax-modbus/issues

Additional context

Hello,
got Error message shown above.
Workaround I used, was to set a # in front of the state class line at line 5247 at solax.py

The opposit entity chargable battery capacity hasn't any state class... so ... 🤷🏼‍♂️

May be, its an unnecessary line, that state class at remaining capacity entitiy 🤔

@steps56 steps56 added bug Something isn't working solax labels Nov 18, 2024
@steps56
Copy link
Author

steps56 commented Nov 18, 2024

Sorry,
state class again enabled for statistics, but changed:
ENERGY
to:
TOTAL

See:
https://developers.home-assistant.io/docs/core/entity/sensor/#available-state-classes

Screenshot_20241118_235159_Firefox Klar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working solax
Projects
None yet
Development

No branches or pull requests

1 participant