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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user