wills106 / homeassistant-solax-modbus

SolaX Power Modbus custom_component for Home Assistant (Supports some Ginlong Solis, Growatt, Sofar Solar, TIGO TSI & Qcells Q.Volt Hyb)
285 stars 85 forks source link

[Bug]: After update to 2024.07.0 Beta1 many entities change the syntax #949

Open smartminjos opened 3 days ago

smartminjos commented 3 days ago

Describe the bug

After update to 2024.07.0 Beta1 many entities change the syntax and therefore historical data are not visible any more. E.g. new syntax is sensor.solax_export_energy_today (old one was sensor.solax_today_s_export_energy. + many more . . . )

Integration Version

2024.07.0b1

Homeassistant core version

2024.6.4

Inverter brand

SolaX Power

Plugin used

plugin_solax.py

Serial prefix

H34A10

Inverter firmware versions

Firmware: DSP v1.33 ARM v1.31

Connection Method

PocketWifi 3.0

Dongle firmware

donno

Detailed Error Log

log nto needed, there is not error in the log

Additional context

no

wills106 commented 3 days ago

What version were you on previously?

smartminjos commented 3 days ago

2024.05.07 i guess the latest non-beta one

wills106 commented 3 days ago

You mustn't have reconfigured the Integration in a long time. I have gone back to August 2023 and it's been the same since. You would have to keep going back in the releases to find out when it changed.

image

smartminjos commented 3 days ago

I see your point however what i see in version 2024.05.07 (i did rollback) is different syntax on entities. If i do upgrade, i get less a bit less entities and different syntax as depicted. I am puzzled here :))) image

wills106 commented 3 days ago

I see what you mean.

In 2024.07.0 Beta x it's using the key as it's ID entity: https://github.com/wills106/homeassistant-solax-modbus/blob/0ce5572312549cadf67e008aeb142af1c1a477db/custom_components/solax_modbus/plugin_solax.py#L4733

But in 2024.05.7 and earlier it's converting the name into it's ID entity: https://github.com/wills106/homeassistant-solax-modbus/blob/0ce5572312549cadf67e008aeb142af1c1a477db/custom_components/solax_modbus/plugin_solax.py#L4732

smartminjos commented 3 days ago

ok, what does it mean for me now ? :) sorry for those questions, i am not IT guy and just user ....

wills106 commented 3 days ago

i am not IT guy

That makes two of us 😅

The change probably came about through #926 I'll try and compare the list of entities on my inverter between the two versions and see how much they have changed first.

smartminjos commented 3 days ago

:))))

ah i see, well i noticed around maybe 10 entities where changed and I struggle to see the data after update. Mainly the one s with _s_today , battery capacity etc.

btw heavy reading in #926 :)

Zwer2k commented 3 days ago

I think using the key as an ID is the right way to go. It would be possible to simply adapt the few keys to the old spelling so that the statistics are not lost.

For example

name = "Today's Export Energy",
key = "export_energy_today",

change to

name = "Today's Export Energy",
key = "today_s_export_energy",

This would allow you to adjust the display names in the future if necessary without losing the statistics

wills106 commented 3 days ago

Yea, that's why I was going to extract the names from both versions to see how many need correcting.