Compare commits
No commits in common. "v0.14" and "v0.14.10" have entirely different histories.
@ -187,19 +187,18 @@ class HonCommandLoader:
|
|||||||
command = favourite.get("command", {})
|
command = favourite.get("command", {})
|
||||||
command_name = command.get("commandName", "")
|
command_name = command.get("commandName", "")
|
||||||
program_name = self._clean_name(command.get("programName", ""))
|
program_name = self._clean_name(command.get("programName", ""))
|
||||||
if not (base := self.commands[command_name].categories.get(program_name)):
|
base: HonCommand = copy(
|
||||||
continue
|
self.commands[command_name].categories[program_name]
|
||||||
base_command: HonCommand = copy(base)
|
)
|
||||||
for data in command.values():
|
for data in command.values():
|
||||||
if isinstance(data, str):
|
if isinstance(data, str):
|
||||||
continue
|
continue
|
||||||
for key, value in data.items():
|
for key, value in data.items():
|
||||||
if parameter := base_command.parameters.get(key):
|
if parameter := base.parameters.get(key):
|
||||||
with suppress(ValueError):
|
with suppress(ValueError):
|
||||||
parameter.value = value
|
parameter.value = value
|
||||||
extra_param = HonParameterFixed("favourite", {"fixedValue": "1"}, "custom")
|
extra_param = HonParameterFixed("favourite", {"fixedValue": "1"}, "custom")
|
||||||
base_command.parameters.update(favourite=extra_param)
|
base.parameters.update(favourite=extra_param)
|
||||||
program = base_command.parameters["program"]
|
if isinstance(program := base.parameters["program"], HonParameterProgram):
|
||||||
if isinstance(program, HonParameterProgram):
|
|
||||||
program.set_value(name)
|
program.set_value(name)
|
||||||
self.commands[command_name].categories[name] = base_command
|
self.commands[command_name].categories[name] = base
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
aiohttp~=3.8.5
|
aiohttp==3.8.4
|
||||||
yarl~=1.9.2
|
yarl==1.8.2
|
||||||
typing-extensions~=4.7.1
|
typing-extensions==4.7.1
|
||||||
|
4
setup.py
4
setup.py
@ -7,7 +7,7 @@ with open("README.md", "r") as f:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pyhOn",
|
name="pyhOn",
|
||||||
version="0.14.12",
|
version="0.14.10",
|
||||||
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,
|
||||||
@ -21,7 +21,7 @@ setup(
|
|||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
python_requires=">=3.10",
|
python_requires=">=3.10",
|
||||||
install_requires=["aiohttp~=3.8.5", "typing-extensions~=4.7.1", "yarl~=1.9.2"],
|
install_requires=["aiohttp==3.8.4", "typing-extensions==4.7.1"],
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 4 - Beta",
|
||||||
"Environment :: Console",
|
"Environment :: Console",
|
||||||
|
Loading…
Reference in New Issue
Block a user