Skip to content

Commit

Permalink
Fix fan index
Browse files Browse the repository at this point in the history
  • Loading branch information
IDmedia committed Mar 8, 2024
1 parent b4ca89c commit 4b02288
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ def temperature(self, msg_data, create_config):
device_name = re.sub('fan', '', device_name, flags=re.IGNORECASE).strip()
device_value = int(device_value)

# Let's align the fan numbering with the Unraid UI by adjusting it
if device_name.isdigit():
device_name = str(int(device_name) + 1)

payload = {
'name': f'Fan {device_name} Speed',
'unit_of_measurement': 'RPM',
Expand Down

0 comments on commit 4b02288

Please sign in to comment.