From 55d2f2d31d0e94b44971abeeeb355c7aa2842669 Mon Sep 17 00:00:00 2001 From: myTselection Date: Sun, 14 Jun 2026 20:45:52 +0200 Subject: [PATCH] fix config screen access #7 --- .../shopping_list_manager/config_flow.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/custom_components/shopping_list_manager/config_flow.py b/custom_components/shopping_list_manager/config_flow.py index 3d21b57..b027c8b 100644 --- a/custom_components/shopping_list_manager/config_flow.py +++ b/custom_components/shopping_list_manager/config_flow.py @@ -50,7 +50,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow): def __init__(self, config_entry): """Initialize options flow.""" - self.config_entry = config_entry + self._config_entry = config_entry async def async_step_init(self, user_input=None): """Manage the options.""" @@ -59,9 +59,9 @@ class OptionsFlowHandler(config_entries.OptionsFlow): return self.async_create_entry(title="", data=user_input) # Get current settings - current_country = self.config_entry.options.get( + current_country = self._config_entry.options.get( "country", - self.config_entry.data.get("country", "NZ") + self._config_entry.data.get("country", "NZ") ) return self.async_show_form( @@ -76,15 +76,15 @@ class OptionsFlowHandler(config_entries.OptionsFlow): }), vol.Optional( "enable_price_tracking", - default=self.config_entry.options.get("enable_price_tracking", True) + default=self._config_entry.options.get("enable_price_tracking", True) ): bool, vol.Optional( "enable_image_search", - default=self.config_entry.options.get("enable_image_search", True) + default=self._config_entry.options.get("enable_image_search", True) ): bool, vol.Optional( "metric_units_only", - default=self.config_entry.options.get("metric_units_only", True) + default=self._config_entry.options.get("metric_units_only", True) ): bool, }), description_placeholders={