mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix config flow in Husqvarna Automower (#132615)
This commit is contained in:
parent
ef89563bad
commit
382d32c7a7
@ -53,10 +53,10 @@ class HusqvarnaConfigFlowHandler(
|
||||
tz = await dt_util.async_get_time_zone(str(dt_util.DEFAULT_TIME_ZONE))
|
||||
automower_api = AutomowerSession(AsyncConfigFlowAuth(websession, token), tz)
|
||||
try:
|
||||
data = await automower_api.get_status()
|
||||
status_data = await automower_api.get_status()
|
||||
except Exception: # noqa: BLE001
|
||||
return self.async_abort(reason="unknown")
|
||||
if data == {}:
|
||||
if status_data == {}:
|
||||
return self.async_abort(reason="no_mower_connected")
|
||||
|
||||
structured_token = structure_token(token[CONF_ACCESS_TOKEN])
|
||||
|
Loading…
x
Reference in New Issue
Block a user