1
0
mirror of https://github.com/mjg59/python-broadlink.git synced 2024-11-21 22:51:41 +01:00

Add method for changing device name (#381)

This commit is contained in:
Felipe Martins Diel 2020-06-08 07:19:21 -03:00 committed by GitHub
parent ca8a5c6a8b
commit 76bcfd0bfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -235,6 +235,12 @@ class device:
return True
def change_name(self, name):
packet = bytearray(4)
packet.extend(map(ord, name))
response = self.send_packet(0x6a, packet)
check_error(response[0x22:0x24])
def get_type(self):
return self.type