Repository navigation
2.0: Rewrite for Home Assistant core, enterprise disks and a dashboard card - #1
Merged
Merged
Conversation
Restructure the repository so the integration can be submitted to Home Assistant core and installed through HACS in the meantime. - Move the SSH and smartctl code into aiosmartctl, an async library in library/ (asyncssh, typed, its own tests and PyPI release workflow). - Support SAS/SCSI disks, disks behind MegaRAID/PERC found with smartctl --scan-open, manually listed controller disks (cciss, areca, 3ware, aacraid), smartctl 6.x text output, sudo, and disks in standby. - Rewrite the integration to current core patterns: runtime_data, entity descriptions, translations, icon translations, devices per host and disk, reauthentication, reconfiguration, options, diagnostics. - Confirm and pin the SSH host key before sending credentials. - Add the SMART Monitor dashboard card in card/. - Add tests with 100% coverage, snapshot tests, and script/run_core_checks.sh, which runs core's hassfest, ruff, codespell, prettier, yamllint, mypy, pylint and pytest against a core checkout. - Document the hardware test status: 2.0 has not yet been run on real hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
setup-uv 10 no longer creates a virtual environment when only a Python version is given, so uv pip install had nowhere to install. Core's .prettierrc.js loads prettier-plugin-sort-json by name, which npx does not make resolvable; install it into a local prefix and set NODE_PATH. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
syrupy and pytest-homeassistant-custom-component both define a "snapshot" fixture. Which one pytest uses depends on plugin load order, which differs between machines: on CI the plain syrupy fixture won, so snapshots were looked up in __snapshots__ and reported as missing. Define the fixture in conftest.py, which always takes precedence, as Home Assistant core does. The core port drops it, since core already provides it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ChristianHandy
marked this pull request as ready for review
October 24, 2026 14:25
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Warning
Not tested on real hardware yet. This draft is for testing on real servers before merging. Every disk type is covered by automated tests on sample
smartctloutput and a simulated SSH server, but version 2.0 has not run against a real disk. See the hardware table in the README.What this changes
aiosmartctllibrary (library/): the SSH and smartctl code moves into an async, typed library based on asyncssh. Home Assistant core requires this split.smartctl --scan-open, and controller disks listed by hand (HP Smart Arraycciss, Areca, 3ware, aacraid). Also smartctl 6.x text output,sudo -n, standby disks that are not woken up, and multipath disks shown once.card/.script/run_core_checks.shcopies the integration into a Home Assistant core checkout and runs core's checks (hassfest, ruff, codespell, prettier, yamllint, strict mypy, pylint, pytest). Everything passes at 100% coverage, both for all platforms and for the sensor-only first core PR.docs/CORE_SUBMISSION.mdlists the remaining steps.Breaking changes
See
CHANGELOG.md. Existing hosts must re-enter credentials and confirm the host key, entity IDs change, health states becomepassed/warning/failed, and the report button and scan interval option are gone.Testing on your hardware
aiosmartctlis not on PyPI yet, so Home Assistant cannot install the requirement from the manifest on its own:pip install ./libraryinto Home Assistant's Python environment, then copycustom_components/smart_monitorinto/config/custom_components/.aiosmartctl-v0.1.0, seedocs/CORE_SUBMISSION.md), or install it to TestPyPI.Requires Home Assistant 2026.10 or newer.
Checklist:
If something looks wrong, attach
smartctl --json -a <device>(add-d <type>for controller disks) and the integration's diagnostics.🤖 Generated with Claude Code