diff --git a/CHANGELOG.md b/CHANGELOG.md index f41bde3..e44c8d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.0.1 + +- Fix missing validation of entry + ## 2.0.0 Component refactored to allow faster future integration for additional features. diff --git a/custom_components/edgeos/component/managers/home_assistant.py b/custom_components/edgeos/component/managers/home_assistant.py index 83fe6f2..509638f 100644 --- a/custom_components/edgeos/component/managers/home_assistant.py +++ b/custom_components/edgeos/component/managers/home_assistant.py @@ -135,25 +135,26 @@ async def async_initialize_data_providers(self): has_legacy_configuration = False - if self._entry.data is not None: - unit = self._entry.data.get(CONF_UNIT) + if self._entry is not None: + if self._entry.data is not None: + unit = self._entry.data.get(CONF_UNIT) - if unit is not None: - await self.storage_api.set_unit(unit) + if unit is not None: + await self.storage_api.set_unit(unit) - has_legacy_configuration = True + has_legacy_configuration = True - if self._entry.options is not None: - consider_away_interval = self._entry.options.get(CONF_LOG_INCOMING_MESSAGES) - log_incoming_messages = self._entry.options.get(CONF_CONSIDER_AWAY_INTERVAL) + if self._entry.options is not None: + consider_away_interval = self._entry.options.get(CONF_LOG_INCOMING_MESSAGES) + log_incoming_messages = self._entry.options.get(CONF_CONSIDER_AWAY_INTERVAL) - has_legacy_configuration = consider_away_interval is not None or log_incoming_messages is not None + has_legacy_configuration = consider_away_interval is not None or log_incoming_messages is not None - if consider_away_interval is not None: - await self.storage_api.set_consider_away_interval(consider_away_interval) + if consider_away_interval is not None: + await self.storage_api.set_consider_away_interval(consider_away_interval) - if log_incoming_messages is not None: - await self.storage_api.set_log_incoming_messages(log_incoming_messages) + if log_incoming_messages is not None: + await self.storage_api.set_log_incoming_messages(log_incoming_messages) if has_legacy_configuration: _LOGGER.info("Starting configuration migration") diff --git a/custom_components/edgeos/manifest.json b/custom_components/edgeos/manifest.json index 08f2edc..2ecea79 100644 --- a/custom_components/edgeos/manifest.json +++ b/custom_components/edgeos/manifest.json @@ -7,6 +7,6 @@ "codeowners": ["@elad-bar"], "requirements": ["aiohttp"], "config_flow": true, - "version": "2.0.0", + "version": "2.0.1", "iot_class": "local_polling" }