fixed dict containing newlines
added missing alias in config
This commit is contained in:
@@ -3,7 +3,7 @@ loglevel: DEBUG
|
|||||||
thermalzones:
|
thermalzones:
|
||||||
- name: GPU+SYSTEM
|
- name: GPU+SYSTEM
|
||||||
hwmon: amdgpu
|
hwmon: amdgpu
|
||||||
source: temp1_input
|
source: amdgpu/temp1_input
|
||||||
factor: 1000
|
factor: 1000
|
||||||
fan:
|
fan:
|
||||||
- it8686/pwm2
|
- it8686/pwm2
|
||||||
|
4
pyfan.py
4
pyfan.py
@@ -22,7 +22,7 @@ class ThermalZone:
|
|||||||
self.target = config["target"]
|
self.target = config["target"]
|
||||||
self.hwname = config["hwmon"]
|
self.hwname = config["hwmon"]
|
||||||
self.hwmap = hwmon_map
|
self.hwmap = hwmon_map
|
||||||
self.alias_replace = re.compile(r'\b(' + '|'.join(re.escape(key) for key in self.hwmap.keys()) + r')\b')
|
self.alias_replace = re.compile('|'.join(self.hwmap.keys()))
|
||||||
self.setup_pwm()
|
self.setup_pwm()
|
||||||
|
|
||||||
logging.getLogger("pyfan").info(
|
logging.getLogger("pyfan").info(
|
||||||
@@ -129,7 +129,7 @@ class PyFan:
|
|||||||
for name in names:
|
for name in names:
|
||||||
hwmon = name.split("/")[-2]
|
hwmon = name.split("/")[-2]
|
||||||
with open(name) as file:
|
with open(name) as file:
|
||||||
hwname = file.read()
|
hwname = file.read().strip()
|
||||||
self.hwmon_map[hwname] = hwmon
|
self.hwmon_map[hwname] = hwmon
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user