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

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

Loading…
Cancel
Save