diff options
| author | D Delmar Davis <don@suspectdevices.com> | 2025-06-22 12:10:49 -0700 |
|---|---|---|
| committer | D Delmar Davis <don@suspectdevices.com> | 2025-06-22 12:10:49 -0700 |
| commit | c21f94c284661f462eba5075a28cd476cf017f8d (patch) | |
| tree | db7cd28726c9c80b0ddd7a74299611569caffa03 | |
| parent | 166a361d8bbcc8992472681a7e23775ef38657a3 (diff) | |
add temperature
| -rw-r--r-- | bin/timetemp.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/timetemp.py b/bin/timetemp.py index 7b03421..12d9317 100644 --- a/bin/timetemp.py +++ b/bin/timetemp.py @@ -18,4 +18,14 @@ display = segments.Seg7x4(i2c) display.fill(0) while True: display.print(time.strftime("%H:%M")) - time.sleep(59.9)
\ No newline at end of file + time.sleep(30) + file=open('/var/lib/prometheus/node-exporter/temp.prom') + display.colon = False + for line in file.readlines(): + values=line.split()[0:2] + if values[0]=='home_temperature_farenheit': + display.print(str(values[1])[0:4]+'f') + file.close() + display.colon = False + time.sleep(30) +
\ No newline at end of file |
