Skip to content

Commit

Permalink
Fix printing manu data when there is no manu data
Browse files Browse the repository at this point in the history
  • Loading branch information
8none1 committed Jan 25, 2025
1 parent c38d489 commit c3c8169
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/lednetwf_ble/models/model_abstractions.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def __init__(self, manu_data):
self.GET_LED_SETTINGS_PACKET = bytearray.fromhex("00 02 80 00 00 05 06 0a 63 12 21 f0 86")

def process_manu_data(self, manu_data):
manu_data_str = ' '.join(f'0x{byte:02X}' for byte in manu_data[next(iter(manu_data))])
LOGGER.debug(f"Manu data: {manu_data_str}")
if manu_data:
manu_data_str = ' '.join(f'0x{byte:02X}' for byte in manu_data[next(iter(manu_data))])
LOGGER.debug(f"Manu data: {manu_data_str}")
manu_data_id = next(iter(manu_data))
self.manu_data = bytearray(manu_data[manu_data_id])
self.fw_major = self.manu_data[0]
Expand Down

0 comments on commit c3c8169

Please # to comment.