From a8220ab2d293bb7f4b014b79d16b2fb05090fa93 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Feb 2021 12:45:55 +0100 Subject: Adding upstream version 1.29.0. Signed-off-by: Daniel Baumann --- collectors/python.d.plugin/am2320/am2320.chart.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'collectors/python.d.plugin/am2320/am2320.chart.py') diff --git a/collectors/python.d.plugin/am2320/am2320.chart.py b/collectors/python.d.plugin/am2320/am2320.chart.py index c15e16eee..8e66544bd 100644 --- a/collectors/python.d.plugin/am2320/am2320.chart.py +++ b/collectors/python.d.plugin/am2320/am2320.chart.py @@ -7,14 +7,13 @@ try: import board import busio import adafruit_am2320 + HAS_AM2320 = True except ImportError: HAS_AM2320 = False - from bases.FrameworkServices.SimpleService import SimpleService - ORDER = [ 'temperature', 'humidity', @@ -60,9 +59,9 @@ class Service(SimpleService): def get_data(self): try: return { - 'temperature': self.am.temperature, - 'humidity': self.am.relative_humidity, - } + 'temperature': self.am.temperature, + 'humidity': self.am.relative_humidity, + } except (OSError, RuntimeError) as error: self.error(error) -- cgit v1.2.3