Skip to content

Commit

Permalink
Use first sensor if not found for temperature sensor (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
timmo001 committed Apr 27, 2024
1 parent 0f3e095 commit 5aa9f28
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions systembridgebackend/modules/cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ async def _get_temperature(self) -> float | None:
sensor,
)
return sensor.current
# Use the first temperature sensor key
for key in temperatures:
for sensor in temperatures[key]:
self._logger.warning(
"Unknown sensor used (may not be correct): %s", sensor
)
return sensor.current
if (
self.sensors.windows_sensors is not None
and self.sensors.windows_sensors.hardware is not None
Expand Down

0 comments on commit 5aa9f28

Please sign in to comment.