mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41:10 +00:00
19 lines
374 B
Python
Executable file
19 lines
374 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
from colorama import Back, Fore, Style
|
|
|
|
from sensors import Sensors
|
|
|
|
|
|
def pretty_print():
|
|
s = Sensors.get_temperatures()
|
|
|
|
for k, v in s.items():
|
|
print(f"{Back.CYAN}{k}{Style.RESET_ALL}")
|
|
|
|
for sensors in v:
|
|
print(f"{sensors.sensor_label}: {sensors.current_temp}°C")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
pretty_print()
|