fix check_power for SP2/SP3 (#72)
Fixed up to avoid merge conflict with #78
This commit is contained in:
parent
4f03ffb963
commit
d346476e63
1 changed files with 5 additions and 1 deletions
|
@ -374,7 +374,11 @@ class sp2(device):
|
||||||
err = response[0x22] | (response[0x23] << 8)
|
err = response[0x22] | (response[0x23] << 8)
|
||||||
if err == 0:
|
if err == 0:
|
||||||
payload = self.decrypt(bytes(response[0x38:]))
|
payload = self.decrypt(bytes(response[0x38:]))
|
||||||
return bool(payload[0x4])
|
if type(payload[0x4]) == int:
|
||||||
|
state = bool(payload[0x4])
|
||||||
|
else:
|
||||||
|
state = bool(ord(payload[0x4]))
|
||||||
|
return state
|
||||||
|
|
||||||
class a1(device):
|
class a1(device):
|
||||||
def __init__ (self, host, mac):
|
def __init__ (self, host, mac):
|
||||||
|
|
Loading…
Reference in a new issue