From 676de402c262b2b1d7c3d326acc1bcda851468ee Mon Sep 17 00:00:00 2001 From: Kev Date: Mon, 5 Feb 2024 18:10:23 -0500 Subject: [PATCH 1/3] Remove configuration mode option --- custom_components/pirateweather/config_flow.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/custom_components/pirateweather/config_flow.py b/custom_components/pirateweather/config_flow.py index fa1bf8e..c5c0864 100644 --- a/custom_components/pirateweather/config_flow.py +++ b/custom_components/pirateweather/config_flow.py @@ -234,15 +234,6 @@ async def async_step_init(self, user_input=None): self.config_entry.data.get(PW_PLATFORM, []), ), ): cv.multi_select(PW_PLATFORMS), - vol.Optional( - CONF_MODE, - default=self.config_entry.options.get( - CONF_MODE, - self.config_entry.data.get( - CONF_MODE, DEFAULT_FORECAST_MODE - ), - ), - ): vol.In(FORECAST_MODES), vol.Optional( CONF_LANGUAGE, default=self.config_entry.options.get( From 6b1fe0b8e787b9c0094c032f958bc9fdc0c31ca0 Mon Sep 17 00:00:00 2001 From: Kev Date: Mon, 5 Feb 2024 18:38:43 -0500 Subject: [PATCH 2/3] Remove configuration option for new users --- custom_components/pirateweather/config_flow.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/custom_components/pirateweather/config_flow.py b/custom_components/pirateweather/config_flow.py index c5c0864..a7f445e 100644 --- a/custom_components/pirateweather/config_flow.py +++ b/custom_components/pirateweather/config_flow.py @@ -26,7 +26,6 @@ DEFAULT_NAME, DEFAULT_SCAN_INTERVAL, DOMAIN, - FORECAST_MODES, LANGUAGES, CONF_UNITS, DEFAULT_UNITS, @@ -73,9 +72,6 @@ async def async_step_user(self, user_input=None): vol.Required(PW_PLATFORM, default=[PW_PLATFORMS[1]]): cv.multi_select( PW_PLATFORMS ), - vol.Required(CONF_MODE, default=DEFAULT_FORECAST_MODE): vol.In( - FORECAST_MODES - ), vol.Required(CONF_LANGUAGE, default=DEFAULT_LANGUAGE): vol.In( LANGUAGES ), From d95c2c25fc6854a24f403840c3e88915441aaa53 Mon Sep 17 00:00:00 2001 From: Kev Date: Tue, 6 Feb 2024 10:05:59 -0500 Subject: [PATCH 3/3] Hardcode forecast mode to daily to fix integration errors --- custom_components/pirateweather/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/pirateweather/__init__.py b/custom_components/pirateweather/__init__.py index ce8ebc0..f14556f 100644 --- a/custom_components/pirateweather/__init__.py +++ b/custom_components/pirateweather/__init__.py @@ -49,7 +49,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: api_key = entry.data[CONF_API_KEY] latitude = entry.data.get(CONF_LATITUDE, hass.config.latitude) longitude = entry.data.get(CONF_LONGITUDE, hass.config.longitude) - forecast_mode = _get_config_value(entry, CONF_MODE) + forecast_mode = "daily" conditions = _get_config_value(entry, CONF_MONITORED_CONDITIONS) units = _get_config_value(entry, CONF_UNITS) forecast_days = _get_config_value(entry, CONF_FORECAST)