diff --git a/custom_components/truenas/manifest.json b/custom_components/truenas/manifest.json index a681e3c..f44044d 100644 --- a/custom_components/truenas/manifest.json +++ b/custom_components/truenas/manifest.json @@ -9,5 +9,5 @@ "issue_tracker": "https://github.com/cyr-ius/hass-truenas/issues", "loggers": ["truenaspy"], "requirements": ["truenaspy==0.6.6"], - "version": "0.7.0" + "version": "0.7.1" } diff --git a/custom_components/truenas/update.py b/custom_components/truenas/update.py index 0bfcf92..d5b09ff 100644 --- a/custom_components/truenas/update.py +++ b/custom_components/truenas/update.py @@ -68,12 +68,17 @@ async def async_setup_entry( entities = [] for description in RESOURCE_LIST: if description.reference: - for value in getattr(coordinator.data, description.refer, {}): - entities.append( - description.func( - coordinator, description, value[description.reference] - ) - ) + specs_entities = [ + description.func(coordinator, description, value[description.reference]) + for value in getattr(coordinator.data, description.refer, {}) + ] + entities.extend(specs_entities) + # for value in getattr(coordinator.data, description.refer, {}): + # entities.append( + # description.func( + # coordinator, description, value[description.reference] + # ) + # ) else: entities.append(description.func(coordinator, description)) @@ -170,5 +175,5 @@ def in_progress(self) -> int: async def async_install(self, version: str, backup: bool, **kwargs: Any) -> None: """Install an update.""" self._installing = True - await self.coordinator.api.async_update_chart(id=id) + await self.coordinator.api.async_update_chart(id=self.data["id"]) await self.coordinator.async_refresh()