Skip to content

Commit c3c8169

Browse files
committed
Fix printing manu data when there is no manu data
1 parent c38d489 commit c3c8169

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

custom_components/lednetwf_ble/models/model_abstractions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ def __init__(self, manu_data):
4040
self.GET_LED_SETTINGS_PACKET = bytearray.fromhex("00 02 80 00 00 05 06 0a 63 12 21 f0 86")
4141

4242
def process_manu_data(self, manu_data):
43-
manu_data_str = ' '.join(f'0x{byte:02X}' for byte in manu_data[next(iter(manu_data))])
44-
LOGGER.debug(f"Manu data: {manu_data_str}")
4543
if manu_data:
44+
manu_data_str = ' '.join(f'0x{byte:02X}' for byte in manu_data[next(iter(manu_data))])
45+
LOGGER.debug(f"Manu data: {manu_data_str}")
4646
manu_data_id = next(iter(manu_data))
4747
self.manu_data = bytearray(manu_data[manu_data_id])
4848
self.fw_major = self.manu_data[0]

0 commit comments

Comments
 (0)