Closed MrRamsus closed 5 days ago
I have something similar, except the new entities have _2
appended to the name.
@JannikL87, coud this be because of your pull request https://github.com/martinarva/dynamic_energy_cost/pull/25?
Looks like this commit https://github.com/martinarva/dynamic_energy_cost/commit/59a2b2fee037a22e1e63214783874f09e0ad1c59
Changed the logic so you can use same sensor for multiple prices. Unfortunately this means it will make new uniqe ID-s for all sensors.
it's a breaking change and you lose the history
Hmm unfortunately yes. That's true. However you can fix this by removing the old entities and renaming the new ones (_2) to the value of the old ones. This way history remains.
Hmm unfortunately yes. That's true. However you can fix this by removing the old entities and renaming the new ones (_2) to the value of the old ones. This way history remains.
But will the integration make new sensors again after restart?
No, it's a one time manual thing (which I forgot about, apologies). So either we revert the commit, find a way to do the migration automatically, or have the users do it manually:
old: entity_some_sensor_id -> remove new: entity_some_sensor_id_2 -> rename to entity_some_sensor_id done
On Tue, 28 May 2024 at 11:31, martinarva @.***> wrote:
Hmm unfortunately yes. That's true. However you can fix this by removing the old entities and renaming the new ones (_2) to the value of the old ones. This way history remains.
But will the integration make new sensors again after restart?
— Reply to this email directly, view it on GitHub https://github.com/martinarva/dynamic_energy_cost/issues/28#issuecomment-2134760173, or unsubscribe https://github.com/notifications/unsubscribe-auth/BIXDPB3LORXLKATOWNYCRZDZERFHLAVCNFSM6AAAAABIMNBHE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZUG43DAMJXGM . You are receiving this because you were mentioned.Message ID: @.***>
@JannikL87,
The solution works for me. I've removed the following entities:
Renamed the following from --> To:
The old data is back. Thanks for the support. For me its solved, but I don't know if this bugreport needs to be opened, because you will automate this step by yourself?
Unfortunately I am not a Python developer, I understood the minimum to make this change, however doing any more logic like this I would like to leave to someone (more) experienced :-)
Closing this issue
Describe the bug I had a working 0.4.1 version with my sensors filled with data. After upgrading to 0.4.2 (via HACS), there are new sensors created and all data are gone (unavailable).
Old sensors:
New sensors:
In the entity (Car Charger) has nothing changed after the update.
Expected behavior A clear and concise description of what you expected to happen. After the update, that the filled in data will be there.
Screenshots If applicable, add screenshots to help explain your problem. Integration:![image](https://github.com/martinarva/dynamic_energy_cost/assets/104757105/dcf180dc-972f-4a7a-bdf7-8c6bef4d1458)
Sensor states: (The unavailable ones are the old ones)![image](https://github.com/martinarva/dynamic_energy_cost/assets/104757105/29327b7a-4961-4d8e-b3d6-5167a5f87bb0)