From 318e60e91eb9e0a457cfcae43ba6d988e0182550 Mon Sep 17 00:00:00 2001 From: Alexandre Leites <1256013+alexandre-leites@users.noreply.github.com> Date: Tue, 14 Mar 2023 14:29:25 +0100 Subject: [PATCH] Update device.py trying to set fixed value from history --- pyhon/device.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyhon/device.py b/pyhon/device.py index e63b89d..54ff200 100644 --- a/pyhon/device.py +++ b/pyhon/device.py @@ -1,6 +1,7 @@ import importlib from pyhon.commands import HonCommand +from pyhon.parameter import HonParameterFixed class HonDevice: @@ -93,7 +94,7 @@ class HonDevice: command.set_program(parameters.pop("program").split(".")[-1].lower()) command = self.commands[name] for key, data in command.settings.items(): - if parameters.get(key) is not None: + if not isinstance(data, HonParameterFixed) and parameters.get(key) is not None: data.value = parameters.get(key) async def load_commands(self):