Fix missing program
This commit is contained in:
parent
22cbd7474a
commit
ccff32e6c1
@ -142,8 +142,11 @@ class HonAppliance:
|
||||
if last is None:
|
||||
continue
|
||||
parameters = command_history[last].get("command", {}).get("parameters", {})
|
||||
if command.categories and parameters.get("category"):
|
||||
command.category = parameters.pop("category").split(".")[-1].lower()
|
||||
if command.categories:
|
||||
if parameters.get("program"):
|
||||
command.category = parameters.pop("program").split(".")[-1].lower()
|
||||
else:
|
||||
command.category = parameters.pop("category")
|
||||
command = self.commands[name]
|
||||
for key, data in command.settings.items():
|
||||
if (
|
||||
|
@ -12,6 +12,9 @@ class HonParameterProgram(HonParameterEnum):
|
||||
def __init__(self, key: str, command: "HonCommand", group: str) -> None:
|
||||
super().__init__(key, {}, group)
|
||||
self._command = command
|
||||
if "PROGRAM" in command.category:
|
||||
self._value: str = command.category.split(".")[-1].lower()
|
||||
else:
|
||||
self._value: str = command.category
|
||||
self._programs: Dict[str, "HonCommand"] = command.categories
|
||||
self._typology: str = "enum"
|
||||
|
Loading…
Reference in New Issue
Block a user