Skip to content

Commit 5ebad32

Browse files
authored
Merge pull request #258 from geofffranks/main
2 parents 8d68678 + afc2408 commit 5ebad32

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

custom_components/generac/config_flow.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class GeneracFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
2424
"""Config flow for generac."""
2525

2626
VERSION = 1
27-
CONNECTION_CLASS = config_entries.CONN_CLASS_CLOUD_POLL
2827

2928
def __init__(self):
3029
"""Initialize."""
@@ -134,11 +133,11 @@ async def _test_credentials(self, username, password, session_cookie):
134133
client = GeneracApiClient(session, username, password, session_cookie)
135134
await client.async_get_data()
136135
return None
137-
except InvalidCredentialsException as e: # pylint: disable=broad-except
138-
_LOGGER.debug("ERROR in testing credentials: %s", e)
136+
except InvalidCredentialsException as e:
137+
_LOGGER.error("Invalid credentials: %s", e)
139138
return "auth"
140-
except Exception as e: # pylint: disable=broad-except
141-
_LOGGER.debug("ERROR: %s", e)
139+
except Exception as e:
140+
_LOGGER.error("Unexpected error testing credentials: %s", e, exc_info=True)
142141
return "internal"
143142

144143

custom_components/generac/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class Property:
107107
@dataclass
108108
class Value:
109109
type: Optional[int]
110-
status: Optional[int] | Optional[str]
110+
status: Optional[int | str]
111111
isLegacy: Optional[bool]
112112
isRunning: Optional[bool]
113113
deviceId: Optional[str]

0 commit comments

Comments
 (0)