about summary refs log tree commit diff
path: root/broadlink/__init__.py
diff options
context:
space:
mode:
authorNick Dimov <3619341+dimovnike@users.noreply.github.com>2018-10-27T13·15+0300
committerNick Dimov <3619341+dimovnike@users.noreply.github.com>2018-10-27T13·15+0300
commit73fc5fc4b97f3d62fee7b25a62622cd20bd586de (patch)
tree5705e31c89ea1a18ad2874dac91b0aee9c698c4e /broadlink/__init__.py
parent58a571400977609c650ed8299c2d7fc3bbc08323 (diff)
Support for a new SP2 device.
It returns different codes for check and checknl.
Diffstat (limited to 'broadlink/__init__.py')
-rw-r--r--broadlink/__init__.py8
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