diff options
| author | D Delmar Davis <don@suspectdevices.com> | 2023-08-03 15:43:40 -0700 |
|---|---|---|
| committer | D Delmar Davis <don@suspectdevices.com> | 2023-08-03 15:43:40 -0700 |
| commit | 154359a9b6bb19d9c972a7f2ab06f4f4577db62c (patch) | |
| tree | dbbdf92baca46b92b61c7d6e76704e4613180925 /readtemp.py | |
| parent | 7dc883740355e0d887442cfa3c3f77a25d3e6a47 (diff) | |
Doh x 2
Diffstat (limited to 'readtemp.py')
| -rwxr-xr-x | readtemp.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/readtemp.py b/readtemp.py index 81d7d63..32a46ae 100755 --- a/readtemp.py +++ b/readtemp.py @@ -26,8 +26,9 @@ for tempsensorid in i2c.scan(): print ("found an AHTx0") sensor = adafruit_ahtx0.AHTx0(i2c) TempRead=sensor.temperature - GotHumidity = True + GotTemperature = True HumidityRead = sensor.relative_humidity + GotHumidity = True else: print ("found something else ", tempsensorid) @@ -48,6 +49,5 @@ if (GotTemperature): print("# HELP home_relative_humidity Temperature read off of external sensor.") print("# TYPE home_relative_humidity gauge") print("home_relative_humidity %0.3f" % sensor.relative_humidity) - file.close() os.replace(tmpfile, '/var/lib/prometheus/node-exporter/temp.prom') |
