Closed VictorS42 closed 3 months ago
Hey there @tsvi, mind taking a look at this issue as it has been labeled with an integration (jewish_calendar
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
jewish_calendar documentation jewish_calendar source (message by IssueLinks)
I had the same problem after the latest update. All 25 existing entities were duplicated with a _2 and the original ones were ignored. This also broke all my automations that referred to the initial entity versions.
I fixed this painfully but manually by:
ha core stop
homeassistant_v2.db
and the .storage
directories/homeassistant/.storage/core.entity_registry
to (a) remove the initial unsubscripted entries (b) remove the '_2' suffix from the new entriessqlite
to delete the 25 _2
suffixed new metadata_id
entries from the states_meta
table. Since these were the last 25 new entries, it was relatively painless using something like:
sqlite3 home-assistant_v2.db "DELETE FROM states_meta where metadata_id > NNN"
sqlite
to merge the new with the old state data. This was relatively simple since the metadata_id
's were in the same order for both the original and the new 25 entities. If that is true and the new _2 entities are the last entries in states_meta
, you can use a single sqlite statement like:
sqlite3 /homeassistant/home-assistant_v2.db "UPDATE states SET metadata_id = metadata_id - <DIFF> WHERE metadata_id > NNN" where <DIFF> is the difference between the new an the old metadata_id's
ha core start
It seems to have worked!
This is not for the faint of heart -- and backing up is critical
@puterboy if you still have the backup of the entity registry file, could you post here the values of the unique_id for the old and new entities? Please also post longitude, latitude, and elevation currently in your home assistant config. I would like to try and fix this for others.
The problem
Home Assistant listed repair: delete the lines for the "Jewish Calendar" integration from configuration .yaml, then restart HA.
After following those instructions, all of the original entities were marked "no longer provided" and a new set appeared with an "_2" appended to the entity ID. Deleting and reinstalling the integration did not resolve the problem. I can manually delete the old entities and delete the "_2" from the new entities.
What version of Home Assistant Core has the issue?
core-2024.6.1
What was the last working version of Home Assistant Core?
core-2024.6.1
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Jewish Calendar
Link to integration documentation on our website
https://www.home-assistant.io/integrations/jewish_calendar
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response