Hey,
I’d like to know if it’s possible to automate the removal of entities.
I have an app with which I manage my work schedule, with that I can add this schedule to my Google calendar which will be added as separate work calendar.
When I do changes to this and upload them to my Google Cal, it removes the old calendar and adds the new one.
In HA, the sync doesn’t work as flawless, the old work calendar entity becomes unavailable and a new one will be added as calendar.work_2.
Naturally that messes with automations and I’d like to remove the old entity automatically when it becomes unavailable and refresh the Google calendar service/rename the new entity.
Not with only the built-in actions. Spook has a delete all orphaned entities action, but the question is whether this entity would be considered orphaned or not. Guess you’ll have to just try and see what happens… Spook also has en action to update an entity ID.