List comprehension

This commit is contained in:
atse 2023-08-04 14:31:31 +08:00
parent 980812de67
commit f3e13cbb0b

View File

@ -65,8 +65,8 @@ THERMOSTAT_PARAMETERS = [[
params = [
CommandsParameter.create(name='Thermostat Channel 0 Parameters', type='group', value=0, children=THERMOSTAT_PARAMETERS[0]),
CommandsParameter.create(name='Thermostat Channel 1 Parameters', type='group', value=1, children=THERMOSTAT_PARAMETERS[1]),
CommandsParameter.create(name=f"Thermostat Channel {ch} Parameters", type='group', value=ch, children=THERMOSTAT_PARAMETERS[ch])
for ch in range(2)
]