We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b949026 commit b3f4869Copy full SHA for b3f4869
hush/hardware/ilo.py
@@ -3,6 +3,7 @@
3
logger = logging.getLogger(__name__)
4
from typing import Any, Dict, List, Optional
5
import time
6
+import re
7
import numpy as np
8
from . import Device
9
from hush.interfaces import ssh
@@ -77,7 +78,8 @@ async def set_speed(self, speed):
77
78
if self._fans == []:
79
self._fans = await self.get_fan_names()
80
for fan in self._fans:
- f = int(fan[4:]) - 1
81
+ numbers = re.findall(r"\d+", fan)
82
+ f = int(numbers) - 1
83
await self.ssh.shell(f"fan p {f} lock {pwm}")
84
85
@property
0 commit comments