1
0
mirror of https://github.com/gryf/pywmtemp.git synced 2026-02-02 14:15:53 +01:00

2 Commits
1.1 ... 1.2

Author SHA1 Message Date
7295d8123d Added guard for unlabeled sensors 2025-07-31 16:42:53 +02:00
6f805d8bdc Fix for phony multiple packages 2023-06-03 11:50:33 +02:00
2 changed files with 7 additions and 7 deletions

View File

@@ -230,6 +230,12 @@ class SensorDockApp(wmdocklib.DockApp):
temp = None
temps = psutil.sensors_temperatures()
for shw in temps.get(item.get('sensor'), []):
# if there is no label configured, take the first sensor
# temperature.
if not item.get('label'):
temp = shw
break
if shw.label == item.get('label'):
temp = shw
break

View File

@@ -19,18 +19,12 @@ classifier =
Programming Language :: Python :: 3.10
Topic :: System :: Networking
[install]
record = install.log
[options.entry_points]
console_scripts =
pywmtemp = pywmtemp.pywmtemp:main
[files]
packages =
pywmtemp
[options]
packages = pywmtemp
install_requires =
wmdocklib
pyyaml