add value and unit properties to ProfileGenericObject to make sure that code like iterators that rely on that do not break
This commit is contained in:
parent
3dc77a8231
commit
804747c370
@ -155,6 +155,16 @@ class ProfileGenericObject(DSMRObject):
|
|||||||
super().__init__(values)
|
super().__init__(values)
|
||||||
self._buffer_list = None
|
self._buffer_list = None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def value(self):
|
||||||
|
# value is added to make sure the telegram iterator does not break
|
||||||
|
return self.__str__()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def unit(self):
|
||||||
|
# value is added to make sure all items have a unit so code that relies on that does not break
|
||||||
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def buffer_length(self):
|
def buffer_length(self):
|
||||||
return self.values[0]['value']
|
return self.values[0]['value']
|
||||||
|
Loading…
Reference in New Issue
Block a user