1
0
mirror of https://github.com/gryf/pywmtemp.git synced 2026-02-01 21:45:47 +01:00

2 Commits
1.1 ... master

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 temp = None
temps = psutil.sensors_temperatures() temps = psutil.sensors_temperatures()
for shw in temps.get(item.get('sensor'), []): 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'): if shw.label == item.get('label'):
temp = shw temp = shw
break break

View File

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