robbinjanssen / home-assistant-omnik-inverter

Read the current, daily and total Wh from your Omnik Inverter via local network (no cloud!)
MIT License
55 stars 21 forks source link

New devices and entities generated after upgrade. #153

Closed ronaldt80 closed 1 year ago

ronaldt80 commented 1 year ago

Upgrade to v 2.5 results in new entity IDs being created wrecking the energy dashboard history.

Following the upgrade to the new version my old entities were listed unavailable with new entities being created. This breaks historic data in the energy dashboard. When i changed the names all history was gone. Now rolled back to yesterday's backup to restore data.

Could someone please advise how to perform the upgrade without this impact?

Context

Diagnostics

"Copy here the code or upload the file"
robbinjanssen commented 1 year ago

Did you come from version v2.4.x? or an earlier version?

Update: i've deleted v2.5.0 for now since more people are having troubles. I'll try to look into this later this week For now it would be best to rollback to the latest v2.4.x version

freddieleeman commented 1 year ago

I've experienced the same issue; To resolve the issue, I've removed the integration, restarted HA, and re-added the integration (v2.5.0), after which everything worked fine. Original entity names and all historical data were still present.

robbinjanssen commented 1 year ago

I think this has to do because i've used another unique_Id, i though they were similar: v2.4.2: https://github.com/robbinjanssen/home-assistant-omnik-inverter/blob/v2.4.2/custom_components/omnik_inverter/sensor.py#L221

v2.5.0 https://github.com/robbinjanssen/home-assistant-omnik-inverter/blob/main/custom_components/omnik_inverter/sensor.py#L242

The name however is the same

robbinjanssen commented 1 year ago

@ronaldt80 Try v2.5.1 :)

ronaldt80 commented 1 year ago

Perfect! This works - many thanks for the quick follow up