Reset commands to defaults

This commit is contained in:
Andre Basche 2023-07-12 00:05:27 +02:00
parent bc7e8994c9
commit 2788a3ac91
5 changed files with 47 additions and 12 deletions

View file

@ -6,7 +6,12 @@ from pyhon.parameter.base import HonParameter
class HonParameterFixed(HonParameter):
def __init__(self, key: str, attributes: Dict[str, Any], group: str) -> None:
super().__init__(key, attributes, group)
self._value = attributes.get("fixedValue", None)
self._value = None
self._set_attributes()
def _set_attributes(self):
super()._set_attributes()
self._value = self._attributes.get("fixedValue", None)
def __repr__(self) -> str:
return f"{self.__class__} (<{self.key}> fixed)"