diff --git a/basyx/aas/model/base.py b/basyx/aas/model/base.py index 20e8b8330..53b15a671 100644 --- a/basyx/aas/model/base.py +++ b/basyx/aas/model/base.py @@ -2152,7 +2152,7 @@ def __init__(self, unit_id: Optional[Reference] = None, source_of_definition: Optional[str] = None, symbol: Optional[str] = None, - value_format: Optional[DataTypeDefXsd] = None, + value_format: DataTypeDefXsd = datatypes.String, value_list: Optional[ValueList] = None, value: Optional[ValueDataType] = None, level_types: Iterable[IEC61360LevelType] = ()): @@ -2168,9 +2168,9 @@ def __init__(self, self._symbol: Optional[str] = symbol self.value_list: Optional[ValueList] = value_list self.level_types: Set[IEC61360LevelType] = set(level_types) - self.value_format: Optional[DataTypeDefXsd] = value_format - self._value: Optional[ValueDataType] = (datatypes.trivial_cast(value, self.value_format) - if (value is not None and self.value_format is not None) else None) + self.value_format: DataTypeDefXsd = value_format + self._value: Optional[ValueDataType] = datatypes.trivial_cast(value, self.value_format) if value is not None \ + else None @property def value(self):