diff --git a/cbpi/api/dataclasses.py b/cbpi/api/dataclasses.py index 014756e7..c0bf08e2 100644 --- a/cbpi/api/dataclasses.py +++ b/cbpi/api/dataclasses.py @@ -65,11 +65,11 @@ def __str__(self): def to_dict(self): if self.instance is not None: state = self.instance.get_state() - type = self.type + actortype = self.type else: state = False - type = "!!! MISSING TYPE !!!" - return dict(id=self.id, name=self.name, type=type, props=self.props.to_dict(), state=state, power=self.power, timer=self.timer) + actortype = "!!! MISSING TYPE !!!" + return dict(id=self.id, name=self.name, type=actortype, props=self.props.to_dict(), state=state, power=self.power, timer=self.timer) class DataType(Enum): VALUE="value"