From 7d33c29eecdaef64488deb31a477741346d54726 Mon Sep 17 00:00:00 2001 From: Kev Date: Sat, 10 Aug 2024 17:00:50 +0000 Subject: [PATCH 1/3] Fixed async_forward_entry_setup warning --- custom_components/pirateweather/__init__.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/custom_components/pirateweather/__init__.py b/custom_components/pirateweather/__init__.py index 1376aaf..cdbf107 100644 --- a/custom_components/pirateweather/__init__.py +++ b/custom_components/pirateweather/__init__.py @@ -109,17 +109,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: CONF_SCAN_INTERVAL: pw_scan_Int, } - # If both platforms - if (PW_PLATFORMS[0] in pw_entity_platform) and ( - PW_PLATFORMS[1] in pw_entity_platform - ): - await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) - # If only sensor - elif PW_PLATFORMS[0] in pw_entity_platform: - await hass.config_entries.async_forward_entry_setup(entry, PLATFORMS[0]) - # If only weather - elif PW_PLATFORMS[1] in pw_entity_platform: - await hass.config_entries.async_forward_entry_setup(entry, PLATFORMS[1]) + # Setup platforms + await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS) update_listener = entry.add_update_listener(async_update_options) hass.data[DOMAIN][entry.entry_id][UPDATE_LISTENER] = update_listener From ce6b5e5d12623853f6cf2dad1018607bc1488ac2 Mon Sep 17 00:00:00 2001 From: Kev Date: Sat, 10 Aug 2024 13:08:25 -0400 Subject: [PATCH 2/3] Bump Version --- custom_components/pirateweather/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/pirateweather/manifest.json b/custom_components/pirateweather/manifest.json index db20e49..c7104e1 100644 --- a/custom_components/pirateweather/manifest.json +++ b/custom_components/pirateweather/manifest.json @@ -12,5 +12,5 @@ "requirements": [ "python-forecastio==1.4.0" ], - "version": "1.5.3" + "version": "1.5." } From 67cb9b6bebdf3f3f954a2f8bc769b8ff93aafe6f Mon Sep 17 00:00:00 2001 From: Kev Date: Sat, 10 Aug 2024 13:08:49 -0400 Subject: [PATCH 3/3] Fix version number --- custom_components/pirateweather/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/pirateweather/manifest.json b/custom_components/pirateweather/manifest.json index c7104e1..fde62ae 100644 --- a/custom_components/pirateweather/manifest.json +++ b/custom_components/pirateweather/manifest.json @@ -12,5 +12,5 @@ "requirements": [ "python-forecastio==1.4.0" ], - "version": "1.5." + "version": "1.5.4" }