From c6e59c572091e460d501c4cfc00883ee4b1858c8 Mon Sep 17 00:00:00 2001 From: DanielV Date: Thu, 26 Sep 2024 15:17:20 +0200 Subject: [PATCH 1/4] Add config_entries Try fixing #52 --- custom_components/nordpool_planner/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/nordpool_planner/__init__.py b/custom_components/nordpool_planner/__init__.py index c616c38..93178e2 100644 --- a/custom_components/nordpool_planner/__init__.py +++ b/custom_components/nordpool_planner/__init__.py @@ -286,6 +286,7 @@ def get_device_info(self) -> DeviceInfo: name=self.name, manufacturer="Nordpool", entry_type=DeviceEntryType.SERVICE, + config_entries=[self._config], ) def input_changed(self, value): From 03d61c3eceaa8f0a5513d036869d46c9ebaee828 Mon Sep 17 00:00:00 2001 From: DanielV Date: Thu, 26 Sep 2024 17:17:14 +0200 Subject: [PATCH 2/4] Add requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..67296d7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +homeassistant \ No newline at end of file From 13bebd0315b18532c8969161ae6c4bfc01fefac2 Mon Sep 17 00:00:00 2001 From: dala318 Date: Fri, 27 Sep 2024 05:51:26 +0000 Subject: [PATCH 3/4] Fix device registry --- custom_components/nordpool_planner/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/nordpool_planner/__init__.py b/custom_components/nordpool_planner/__init__.py index 93178e2..0b2c008 100644 --- a/custom_components/nordpool_planner/__init__.py +++ b/custom_components/nordpool_planner/__init__.py @@ -282,11 +282,11 @@ def register_output_listener_entity(self, entity, conf_key="") -> None: def get_device_info(self) -> DeviceInfo: """Get device info to group entities.""" return DeviceInfo( - identifiers={(DOMAIN, self._config.data[CONF_TYPE])}, + identifiers={(DOMAIN, self._config.entry_id)}, name=self.name, manufacturer="Nordpool", entry_type=DeviceEntryType.SERVICE, - config_entries=[self._config], + model="Forecast", ) def input_changed(self, value): From f044e4b0e212980bef167d46dddee43398b13e30 Mon Sep 17 00:00:00 2001 From: dala318 Date: Fri, 27 Sep 2024 05:55:46 +0000 Subject: [PATCH 4/4] Bump version in config-flow --- custom_components/nordpool_planner/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/nordpool_planner/manifest.json b/custom_components/nordpool_planner/manifest.json index 02befe3..bea76f1 100644 --- a/custom_components/nordpool_planner/manifest.json +++ b/custom_components/nordpool_planner/manifest.json @@ -8,5 +8,5 @@ "iot_class": "calculated", "issue_tracker": "https://github.com/dala318/nordpool_planner/issues", "requirements": [], - "version": "2.0.0" + "version": "2.0.4" }