mirror of
https://github.com/Andre0512/pyhOn.git
synced 2024-12-22 18:55:32 +00:00
Fix missing program
This commit is contained in:
parent
22cbd7474a
commit
ccff32e6c1
|
@ -142,8 +142,11 @@ class HonAppliance:
|
||||||
if last is None:
|
if last is None:
|
||||||
continue
|
continue
|
||||||
parameters = command_history[last].get("command", {}).get("parameters", {})
|
parameters = command_history[last].get("command", {}).get("parameters", {})
|
||||||
if command.categories and parameters.get("category"):
|
if command.categories:
|
||||||
command.category = parameters.pop("category").split(".")[-1].lower()
|
if parameters.get("program"):
|
||||||
|
command.category = parameters.pop("program").split(".")[-1].lower()
|
||||||
|
else:
|
||||||
|
command.category = parameters.pop("category")
|
||||||
command = self.commands[name]
|
command = self.commands[name]
|
||||||
for key, data in command.settings.items():
|
for key, data in command.settings.items():
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -12,7 +12,10 @@ class HonParameterProgram(HonParameterEnum):
|
||||||
def __init__(self, key: str, command: "HonCommand", group: str) -> None:
|
def __init__(self, key: str, command: "HonCommand", group: str) -> None:
|
||||||
super().__init__(key, {}, group)
|
super().__init__(key, {}, group)
|
||||||
self._command = command
|
self._command = command
|
||||||
self._value: str = command.category
|
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._programs: Dict[str, "HonCommand"] = command.categories
|
||||||
self._typology: str = "enum"
|
self._typology: str = "enum"
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ with open("README.md", "r") as f:
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pyhOn",
|
name="pyhOn",
|
||||||
version="0.10.1",
|
version="0.10.2",
|
||||||
author="Andre Basche",
|
author="Andre Basche",
|
||||||
description="Control hOn devices with python",
|
description="Control hOn devices with python",
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
|
|
Loading…
Reference in a new issue