Fix error for no category

v0.12 v0.10.4
Andre Basche 1 year ago
parent 365a37b42d
commit 7bd3aac7c5

@ -142,7 +142,9 @@ class HonAppliance:
if last is None:
continue
parameters = command_history[last].get("command", {}).get("parameters", {})
if command.categories:
if command.categories and (
parameters.get("program") or parameters.get("category")
):
if parameters.get("program"):
command.category = parameters.pop("program").split(".")[-1].lower()
else:

@ -7,7 +7,7 @@ with open("README.md", "r") as f:
setup(
name="pyhOn",
version="0.10.3",
version="0.10.4",
author="Andre Basche",
description="Control hOn devices with python",
long_description=long_description,

Loading…
Cancel
Save