diff --git a/CHANGELOG.md b/CHANGELOG.md index 66428d6..b001051 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,13 @@ # Changelog +## 1.1.8 + +- Removed entity / device delete upon restarting HA + ## 1.1.7 - Added support for long term statistics -- + ## 1.1.6 - Upgraded code to support breaking changes of HA v2012.12.0 diff --git a/custom_components/edgeos/managers/entity_manager.py b/custom_components/edgeos/managers/entity_manager.py index fa3d2da..54be1c3 100644 --- a/custom_components/edgeos/managers/entity_manager.py +++ b/custom_components/edgeos/managers/entity_manager.py @@ -127,11 +127,6 @@ def update(self): async def _async_update(self): step = "Mark as ignore" try: - entities_to_delete = [] - - for entity in self.get_all_entities(): - entities_to_delete.append(entity.unique_id) - step = "Create components" self.create_components() @@ -160,9 +155,6 @@ async def _async_update(self): if entity.status == ENTITY_STATUS_CREATED: entity_item = self.entity_registry.async_get(entity_id) - if entity.unique_id in entities_to_delete: - entities_to_delete.remove(entity.unique_id) - step = f"Mark as created - {domain} -> {entity_key}" entity_component = domain_component( @@ -202,17 +194,6 @@ async def _async_update(self): if len(entities_to_add) > 0: async_add_entities(entities_to_add, True) - if len(entities_to_delete) > 0: - _LOGGER.info(f"Following items will be deleted: {entities_to_delete}") - - for domain in SIGNALS: - entities = dict(self.get_entities(domain)) - - for entity_key in entities: - entity = entities[entity_key] - if entity.unique_id in entities_to_delete: - await self.ha.delete_entity(domain, entity.name) - except Exception as ex: self.log_exception(ex, f"Failed to update, step: {step}") diff --git a/custom_components/edgeos/manifest.json b/custom_components/edgeos/manifest.json index c4be943..79df70a 100644 --- a/custom_components/edgeos/manifest.json +++ b/custom_components/edgeos/manifest.json @@ -6,6 +6,6 @@ "codeowners": ["@elad-bar"], "requirements": ["aiohttp"], "config_flow": true, - "version": "1.1.7", + "version": "1.1.8", "iot_class": "local_polling" }