diff options
Diffstat (limited to 'broadlink')
-rwxr-xr-x | broadlink/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/broadlink/__init__.py b/broadlink/__init__.py index cd9d1599f144..2f3966c4762f 100755 --- a/broadlink/__init__.py +++ b/broadlink/__init__.py @@ -180,6 +180,12 @@ class device: response = self.cs.recvfrom(1024) return response[0] + def set_power(self, state): + packet = bytearray(8) + packet[0] = 2 + packet[4] = state + self.send_packet(0x6a, packet) + def send_data(self, data): packet = bytearray([0x02, 0x00, 0x00, 0x00]) packet += data |