Skip to content

Commit

Permalink
Merge pull request #446 from nickbabcock/bump-libre
Browse files Browse the repository at this point in the history
Update LibreHardwareMonitor to latest
  • Loading branch information
nickbabcock authored Apr 10, 2024
2 parents f89f9c0 + 2518bd3 commit 8a7df52
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OhmGraphite/OhmGraphite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="LibreHardwareMonitorLib" Version="0.9.3" />
<PackageReference Include="LibreHardwareMonitorLib" Version="0.9.4-pre277" />
<PackageReference Include="InfluxDB.Client" Version="4.14.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
Expand Down
2 changes: 2 additions & 0 deletions OhmGraphite/PrometheusCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ string BaseUnit()
return "control_percent";
case SensorType.Level: // %
return "level_percent";
case SensorType.Humidity: // %
return "humidity_percent";
case SensorType.Fan: // RPM
return "revolutions_per_minute";
case SensorType.Flow: // L/h
Expand Down
5 changes: 4 additions & 1 deletion OhmGraphite/Translation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public enum SensorType
Throughput, // B/s
TimeSpan, // Seconds
Energy, // milliwatt-hour (mWh)
Noise // dBA
Noise, // dBA
Humidity, // %
}

/// <summary>
Expand Down Expand Up @@ -91,6 +92,8 @@ public static SensorType ToOwnSensor(this LibreHardwareMonitor.Hardware.SensorTy
return SensorType.Energy;
case LibreHardwareMonitor.Hardware.SensorType.Noise:
return SensorType.Noise;
case LibreHardwareMonitor.Hardware.SensorType.Humidity:
return SensorType.Humidity;
default:
throw new ArgumentOutOfRangeException(nameof(s), s, "unexpected hardware monitor sensor translation");
}
Expand Down

0 comments on commit 8a7df52

Please sign in to comment.