Skip to content

Commit 6898a2e

Browse files
committed
Fix bug in serial_send in crestron.py
1 parent d1219f4 commit 6898a2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom_components/crestron/crestron.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ def set_serial (self, join, string):
136136
return
137137
elif self._writer:
138138
data = struct.pack('>BB', 0b11001000 | ( (join - 1) >> 7 ), (join - 1) & 0b01111111)
139-
data += string
139+
data += string.encode()
140140
data += b'\xff'
141141
self._writer.write(data)
142-
_LOGGER.debug(f'Sending Serial: {join}, {value}')
142+
_LOGGER.debug(f'Sending Serial: {join}, {string}')
143143
else:
144144
_LOGGER.info('Could not send. No connection to hub')

0 commit comments

Comments
 (0)