When fetching the host info without UDisks2 D-Bus connected it would raise an exception and disable managing addons via home assistant (and other GUI functions that need host info status).
* Storage space usage API
* Move to host API
* add tests
* fix test url
* more tests
* fix tests
* fix test
* PR comments
* update test
* tweak format and url
* add .DS_Store to .gitignore
* update tests
* test coverage
* update to new struct
* update test
Not all disks have all SMART attributes available, e.g. Sentry showed
devices with missing "wctemp". In practice, any SMART attribute could
be missing. Make sure we handle this gracefully.
This avoids that we display a 10% life time use for a brand new
eMMC storage. The values are estimates anyways, and there is a
separate value which represents life time completely used (100%).
* Move read_text to executor
* switch to async_capture_exception
* Finish moving read_text to executor
* Cover read_bytes and some write_text calls as well
* Fix await issues
* Fix format_message
* Bad message error marks system as unhealthy
* Finish adding test cases for changes
* Rename test file for uniqueness
* bad_message to oserror_bad_message
* Omit some checks and check for network mounts
* Return list of possible data disk targets
* fix path
* fix tests
* Add test
* Fix tests
* Add tests
* Add more tests
* Remove debug
* Address comments
* more clear
* Add eMMC life-time estimate support
Expose life time estimate as Host Info property "ssd_life_time"
* Fix pytest
* Fix path to helper
* Allow protected access in tests
* Apply suggestions from code review
Rename SSD to disk.
Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
* Rename functions as well
* Update host.py
Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
* Add support for plug&play container & full udev passtrhough
* plug & play devices
* this hack is not needed anymore
* Fix GPIO issue
* Apply suggestions from code review
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Franck Nijhof <git@frenck.dev>