Fix code depts

This commit is contained in:
Andre Basche 2023-04-15 23:02:37 +02:00
parent a1618bb18a
commit 46ff9be4a2
10 changed files with 34 additions and 27 deletions

View file

@ -124,8 +124,8 @@ class HonAppliance:
if last is None:
continue
parameters = command_history[last].get("command", {}).get("parameters", {})
if command._multi and parameters.get("program"):
command.set_program(parameters.pop("program").split(".")[-1].lower())
if command.programs and parameters.get("program"):
command.program = parameters.pop("program").split(".")[-1].lower()
command = self.commands[name]
for key, data in command.settings.items():
if (
@ -148,9 +148,7 @@ class HonAppliance:
multi = {}
for program, attr2 in attr.items():
program = program.split(".")[-1].lower()
cmd = HonCommand(
command, attr2, self._api, self, multi=multi, program=program
)
cmd = HonCommand(command, attr2, self._api, self, programs=multi, program_name=program)
multi[program] = cmd
commands[command] = cmd
self._commands = commands