lywsd02
lywsd02 copied to clipboard
Please add new device support
I bought a new version of the device - it does not work with the current code. If you change the code:
@property
def time(self):
with self.connect():
ch = self._peripheral.getCharacteristics(uuid=UUID_TIME)[0]
value = ch.read()
if len(value) == 7:
value = value[:-2]
if len(value) == 5:
ts, tz_offset = struct.unpack('Ib', value)
all OK