lego-monitoring/main.py
2024-04-27 15:33:30 +03:00

15 lines
348 B
Python

from sensors import Sensors
from colorama import Fore, Style, Back
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()