fix(channels): use device-reported max_channels instead of hardcoded 8

Firmware reports MAX_GROUP_CHANNELS (typically 40 for companion builds)
in the DEVICE_INFO response. Fetch it at startup and use it in all
channel iteration loops. Previously hardcoded range(8) prevented
channels 8+ from appearing and blocked adding new channels.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-03-02 20:38:15 +01:00
parent 9b206beeac
commit d6a7354f06
3 changed files with 16 additions and 5 deletions
+1 -1
View File
@@ -258,7 +258,7 @@ def _execute_console_command(args: list) -> str:
elif cmd == 'channels':
lines = []
for i in range(8):
for i in range(device_manager._max_channels):
ch = device_manager.get_channel_info(i)
if ch and ch.get('name'):
lines.append(f" [{i}] {ch['name']}")