little more optimization

pull/56/head
sleevezipper 4 years ago
parent 70705578d5
commit e124c1e4b2

@ -17,13 +17,13 @@ namespace hass_workstation_service.Domain.Sensors
{
_computer = new Computer
{
IsCpuEnabled = true,
IsCpuEnabled = false,
IsGpuEnabled = true,
IsMemoryEnabled = true,
IsMotherboardEnabled = true,
IsControllerEnabled = true,
IsNetworkEnabled = true,
IsStorageEnabled = true
IsMemoryEnabled = false,
IsMotherboardEnabled = false,
IsControllerEnabled = false,
IsNetworkEnabled = false,
IsStorageEnabled = false,
};
_computer.Open();
@ -55,7 +55,6 @@ namespace hass_workstation_service.Domain.Sensors
{
return "NotSupported";
}
return sensor.Value.HasValue ? sensor.Value.Value.ToString("#.##", CultureInfo.InvariantCulture) : "Unknown";
}
}

@ -17,13 +17,13 @@ namespace hass_workstation_service.Domain.Sensors
{
_computer = new Computer
{
IsCpuEnabled = true,
IsCpuEnabled = false,
IsGpuEnabled = true,
IsMemoryEnabled = true,
IsMotherboardEnabled = true,
IsControllerEnabled = true,
IsNetworkEnabled = true,
IsStorageEnabled = true
IsMemoryEnabled = false,
IsMotherboardEnabled = false,
IsControllerEnabled = false,
IsNetworkEnabled = false,
IsStorageEnabled = false,
};
_computer.Open();

Loading…
Cancel
Save