Merge pull request #71 from lowdef/fix_ProfileGenericObject_for_telegram_iterator
add value and unit properties to ProfileGenericObject to make sure they do not break
This commit is contained in:
commit
e607b62fa2
@ -155,6 +155,16 @@ class ProfileGenericObject(DSMRObject):
|
||||
super().__init__(values)
|
||||
self._buffer_list = None
|
||||
|
||||
@property
|
||||
def value(self):
|
||||
# value is added to make sure the telegram iterator does not break
|
||||
return self.values
|
||||
|
||||
@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
|
||||
def buffer_length(self):
|
||||
return self.values[0]['value']
|
||||
|
Loading…
Reference in New Issue
Block a user