diff options
author | Daniel Høyer Iversen <mail@dahoiv.net> | 2018-11-02T10·24+0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-02T10·24+0100 |
commit | 5cfb92ee12f1afc2e5a997a9f3121f33b5b2ece0 (patch) | |
tree | dbaecb994dfe6c3fb357b7a80334215d1b095b71 | |
parent | daf38546a9bdb3888ea5c001af5635c2d7d9f0a8 (diff) | |
parent | 73fc5fc4b97f3d62fee7b25a62622cd20bd586de (diff) |
Merge pull request #211 from dimovnike/master
Support for a new SP2 device.
-rw-r--r-- | broadlink/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/broadlink/__init__.py b/broadlink/__init__.py index 9dccc8d4b2d0..02a8e2a8e40f 100644 --- a/broadlink/__init__.py +++ b/broadlink/__init__.py @@ -399,12 +399,12 @@ class sp2(device): if err == 0: payload = self.decrypt(bytes(response[0x38:])) if type(payload[0x4]) == int: - if payload[0x4] == 1 or payload[0x4] == 3: + if payload[0x4] == 1 or payload[0x4] == 3 or payload[0x4] == 0xFD: state = True else: state = False else: - if ord(payload[0x4]) == 1 or ord(payload[0x4]) == 3: + if ord(payload[0x4]) == 1 or ord(payload[0x4]) == 3 or ord(payload[0x4]) == 0xFD: state = True else: state = False @@ -419,12 +419,12 @@ class sp2(device): if err == 0: payload = self.decrypt(bytes(response[0x38:])) if type(payload[0x4]) == int: - if payload[0x4] == 2 or payload[0x4] == 3: + if payload[0x4] == 2 or payload[0x4] == 3 or payload[0x4] == 0xFF: state = True else: state = False else: - if ord(payload[0x4]) == 2 or ord(payload[0x4]) == 3: + if ord(payload[0x4]) == 2 or ord(payload[0x4]) == 3 or ord(payload[0x4]) == 0xFF: state = True else: state = False |