File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -191,12 +191,12 @@ async def _request(
191191
192192 LOGGER .debug ("Data received from /%s: %s" , endpoint , data )
193193
194- if data .get ("error" ) == "mfa_required" :
194+ if data and data .get ("error" ) == "mfa_required" :
195195 # If we get an "error" related to MFA, the response body data is
196196 # necessary for continuing on, so we swallow the error and return
197197 # that data:
198198 return data
199- if data .get ("type" ) == "NoRemoteManagement" :
199+ if data and data .get ("type" ) == "NoRemoteManagement" :
200200 raise EndpointUnavailableError (
201201 f"Endpoint unavailable in plan: { endpoint } "
202202 ) from None
Original file line number Diff line number Diff line change @@ -15,9 +15,6 @@ class LockStates(Enum):
1515 unknown = 99
1616
1717
18- STATE_MAP = {1 : LockStates .locked , 2 : LockStates .unlocked }
19-
20-
2118class Lock (EntityV3 ):
2219 """A lock that works with V3 systems.
2320
You can’t perform that action at this time.
0 commit comments