-
-
Notifications
You must be signed in to change notification settings - Fork 28.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System Monitor disk usage reports identical values for all devices #50158
Comments
I’ve seen this too. To me, the During set up, line 228 in
If this is called for a 2nd or 3rd time, the previous value of Line 229 creates a new SystemMonitorSensor per config line
and uses the registry as the data store. Thus when the 2nd or 3rd sensor of the same type is added they all share the same |
I can confirm. I found same issue after core upgrade.
|
I have fixed it in my local environment, had have just created a pull request #50362 |
* Fix #50158 - add support for multiple disks * Rework as a tuple
* Fix #50158 - add support for multiple disks * Rework as a tuple
Should be fixed in 2021.5.2 |
* Fix home-assistant#50158 - add support for multiple disks * Rework as a tuple
The problem
After upgrading to 2021.5.0 I noticed that all my disk usage widgets on the dashboard were showing identical values.
The code uses
psutil.disk_usage(path)
to check disk space, and when I ran the same command inside the home assistant docker container, in a python shell, it came back with correct values.So after some digging in the code, I came across #48699 which seems to have introduced caching, which could cause an issue like this. Could it be using a single cached value for all disk usage/device entries?
What is version of Home Assistant Core has the issue?
2021.5.0
What was the last working version of Home Assistant Core?
2021.4.6
What type of installation are you running?
Home Assistant Container
Integration causing the issue
systemmonitor
Link to integration documentation on our website
https://www.home-assistant.io/integrations/systemmonitor/
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: