Skip to content

Commit 7d597ff

Browse files
committed
Fix the config options flow to actually save updated values
1 parent 6f1623b commit 7d597ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

custom_components/generac/config_flow.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,9 @@ class GeneracOptionsFlowHandler(config_entries.OptionsFlow):
9191

9292
def __init__(self, config_entry):
9393
"""Initialize HACS options flow."""
94+
self.config_entry = config_entry
9495
self.options = dict(config_entry.options)
9596

96-
@property
97-
def config_entry(self):
98-
return config_entries.async_get_entry(self.handler)
99-
10097
async def async_step_init(self, user_input=None): # pylint: disable=unused-argument
10198
"""Manage the options."""
10299
return await self.async_step_user()
@@ -121,6 +118,9 @@ async def async_step_user(self, user_input=None):
121118

122119
async def _update_options(self):
123120
"""Update config entry options."""
121+
self.hass.config_entries.async_update_entry(
122+
self.config_entry, data=self.options
123+
)
124124
return self.async_create_entry(
125125
title=self.config_entry.data.get(CONF_USERNAME, "generac"),
126126
data=self.options,

0 commit comments

Comments
 (0)