mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
Add numeric state_ids to sensor readings
A plugin may provide a numeric enumeration for state ids. Provide that for programmatic recognition of events in addition to being able to combine the available text.
This commit is contained in:
parent
19dd0539a9
commit
905c41b021
@ -746,6 +746,8 @@ class SensorReadings(ConfluentMessage):
|
||||
sensordict['units'] = sensor['units']
|
||||
if 'states' in sensor:
|
||||
sensordict['states'] = sensor['states']
|
||||
if 'state_ids' in sensor:
|
||||
sensordict['state_ids'] = sensor['state_ids']
|
||||
if 'health' in sensor:
|
||||
sensordict['health'] = sensor['health']
|
||||
if 'type' in sensor:
|
||||
|
@ -279,7 +279,8 @@ persistent_ipmicmds = {}
|
||||
|
||||
def _dict_sensor(pygreading):
|
||||
retdict = {'name': pygreading.name, 'value': pygreading.value,
|
||||
'states': pygreading.states, 'units': pygreading.units,
|
||||
'states': pygreading.states, 'state_ids': pygreading.state_ids,
|
||||
'units': pygreading.units,
|
||||
'health': _str_health(pygreading.health),
|
||||
'type': pygreading.type,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user