Fix systematic warning in influxdb sensor (#7541)

This commit is contained in:
bestlibre 2017-05-13 05:47:12 +02:00 committed by Paulus Schoutsen
parent 25cb7c652b
commit ad15844cf4

View file

@ -174,7 +174,7 @@ class InfluxSensorData(object):
"to UNKNOWN: %s", self.query)
self.value = None
else:
if points:
if len(points) > 1:
_LOGGER.warning("Query returned multiple points, only first "
"one shown: %s", self.query)
self.value = points[0].get('value')