summaryrefslogtreecommitdiffstats
path: root/collectors/python.d.plugin/am2320/am2320.chart.py
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/python.d.plugin/am2320/am2320.chart.py')
-rw-r--r--collectors/python.d.plugin/am2320/am2320.chart.py9
1 files changed, 4 insertions, 5 deletions
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)