From c21f94c284661f462eba5075a28cd476cf017f8d Mon Sep 17 00:00:00 2001 From: D Delmar Davis Date: Sun, 22 Jun 2025 12:10:49 -0700 Subject: add temperature --- bin/timetemp.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3