Add Humidity Sensors support (#1281)

* Add Humidity Sensors support

Signed-off-by: wlkmanist <vlad.king5555@mail.ru>

* Humidity icon

Signed-off-by: wlkmanist <vlad.king5555@mail.ru>

* fix humidity icon

Signed-off-by: wlkmanist <vlad.king5555@mail.ru>

---------

Signed-off-by: wlkmanist <vlad.king5555@mail.ru>
This commit is contained in:
wlkmanist
2024-03-25 17:07:22 +01:00
committed by GitHub
parent e2c861bdf0
commit 4fb49c5e80
8 changed files with 23 additions and 9 deletions
+3 -1
View File
@@ -183,6 +183,7 @@ public class SensorNotifyIcon : IDisposable
case SensorType.Load:
case SensorType.Energy:
case SensorType.Noise:
case SensorType.Humidity:
return $"{Sensor.Value:F0}";
default:
return "-";
@@ -259,6 +260,7 @@ public class SensorNotifyIcon : IDisposable
case SensorType.Factor: format = "\n{0}: {1:F3} GB"; break;
case SensorType.Energy: format = "\n{0}: {0:F0} mWh"; break;
case SensorType.Noise: format = "\n{0}: {0:F0} dBA"; break;
case SensorType.Humidity: format = "\n{0}: {0:F0} %"; break;
}
string formattedValue = string.Format(format, Sensor.Name, Sensor.Value);
@@ -277,4 +279,4 @@ public class SensorNotifyIcon : IDisposable
_notifyIcon.Text = text;
_notifyIcon.Visible = true;
}
}
}