2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-28 16:20:54 +00:00

Fix cooltera pdu sensor read

This commit is contained in:
Jarrod Johnson
2026-09-25 09:33:01 -04:00
parent 9ad123a0e2
commit 4d2bb02ea1
@@ -166,11 +166,11 @@ async def read_sensors(element, node, configmanager):
if len(element) == 3:
# the names are only known after reading the device, as the sensor
# set depends on the model
for sensor in sn[0] if sn else ():
yield msg.ChildCollection(simplify_name(sensor['name']))
return
if not sn:
return []
return [msg.ChildCollection(simplify_name(sensor['name'])) for sensor in sn[0] if sn]
if sn:
yield msg.SensorReadings(sn[0], name=node)
return [msg.SensorReadings(sn[0], name=node)]
async def retrieve(nodes, element, configmanager, inputdata):