Add fans and battery sensor to systemmonitor#151066
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds fan RPM and battery sensor capabilities to the systemmonitor integration, expanding its monitoring capabilities beyond existing disk, memory, and temperature sensors.
Key changes:
- Adds fan RPM sensors that read from
psutil.sensors_fans()to display individual fan speeds - Adds a battery sensor that reads from
psutil.sensors_battery()to show battery percentage - Implements proper sensor descriptions, icons, and string translations for the new sensor types
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
tests/components/systemmonitor/conftest.py |
Adds mock data for fan and battery sensors in test fixtures |
homeassistant/components/systemmonitor/util.py |
Implements read_fan_rpm() utility function to parse fan sensor data |
homeassistant/components/systemmonitor/strings.json |
Adds translation keys for battery and fan RPM sensor names |
homeassistant/components/systemmonitor/sensor.py |
Defines sensor descriptions and setup logic for battery and fan RPM sensors |
homeassistant/components/systemmonitor/icons.json |
Adds icons for battery and fan RPM sensors |
homeassistant/components/systemmonitor/coordinator.py |
Updates data coordinator to fetch fan and battery data from psutil |
8 tasks
d71a03d to
6d3b9ce
Compare
elupus
previously requested changes
Aug 24, 2025
Contributor
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
NoRi2909
reviewed
Aug 27, 2025
d8d2cc9 to
d4a392a
Compare
joostlek
previously requested changes
Sep 30, 2025
691fa9c to
9ab94df
Compare
emontnemery
requested changes
Nov 3, 2025
19 tasks
405d722 to
a01a238
Compare
emontnemery
requested changes
Nov 6, 2025
emontnemery
approved these changes
Nov 6, 2025
Contributor
emontnemery
left a comment
There was a problem hiding this comment.
LGTM, thanks @gjohansson-ST 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking change
Proposed change
Add sensors for fan rpm and battery to systemmonitor
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: