2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-14 19:57:47 +00:00

Merge "Provide more consistent attributes"

This commit is contained in:
Jenkins 2017-01-13 14:11:30 +00:00 committed by Gerrit Code Review
commit d1318616c6

View File

@ -193,6 +193,8 @@ class SensorReading(object):
self.value = None
self.imprecision = None
self.states = []
self.state_ids = []
self.unavailable = 0
try:
self.health = reading['health']
self.states = reading['states']
@ -215,6 +217,7 @@ class SensorReading(object):
'imprecision': self.imprecision,
'name': self.name,
'type': self.type,
'unavailable': self.unavailable,
'health': self.health
})