Skip to content

Commit b6137b8

Browse files
committed
Humanize success message and address deprecation warning
1 parent e7b97f8 commit b6137b8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

custom_components/generac/config_flow.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async def async_step_reconfigure(self, user_input=None):
6161
return self.async_update_reload_and_abort(
6262
entry,
6363
data={**entry.data, **user_input},
64-
reason="reconfigure_successful",
64+
reason="Reconfigure Successful",
6565
)
6666
errors["base"] = error
6767

@@ -147,7 +147,6 @@ class GeneracOptionsFlowHandler(config_entries.OptionsFlow):
147147

148148
def __init__(self, config_entry):
149149
"""Initialize HACS options flow."""
150-
self.config_entry = config_entry
151150
self.options = dict(config_entry.options)
152151

153152
async def async_step_init(self, user_input=None): # pylint: disable=unused-argument

tests/test_config_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ async def test_reconfigure_flow(hass: HomeAssistant) -> None:
204204
await hass.async_block_till_done()
205205

206206
assert result2["type"] == "abort"
207-
assert result2["reason"] == "reconfigure_successful"
207+
assert result2["reason"] == "Reconfigure Successful"
208208
assert entry.data["session_cookie"] == "new_cookie"
209209

210210

0 commit comments

Comments
 (0)