Skip to content

Commit fb27614

Browse files
committed
Fix the saving of options to not accidentally disable entities
1 parent 3ddb12c commit fb27614

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

custom_components/generac/config_flow.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ async def async_step_user(self, user_input=None):
108108
"""Handle a flow initialized by the user."""
109109
if user_input is not None:
110110
self.options.update(user_input)
111-
return await self._update_options()
111+
return self.async_create_entry(data=user_input)
112112

113113
return self.async_show_form(
114114
step_id="user",
@@ -122,12 +122,3 @@ async def async_step_user(self, user_input=None):
122122
),
123123
)
124124

125-
async def _update_options(self):
126-
"""Update config entry options."""
127-
self.hass.config_entries.async_update_entry(
128-
self.config_entry, data=self.options
129-
)
130-
return self.async_create_entry(
131-
title=self.config_entry.data.get(CONF_USERNAME, "generac"),
132-
data=self.options,
133-
)

0 commit comments

Comments
 (0)