feat: MQTT / Home Assistant bridge + modern packaging - #1
Merged
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Turns PowerGuess into a Home Assistant power sensor for headless Linux devices (Raspberry Pi, mini PC, SBC, laptop) that have no smart plug, and decouples the core from OVOS.
What's new
python -m powerguess— publishes power/current/voltage (and battery on devices that have one) to MQTT with Home Assistant auto-discovery, mirroring the siblingvad2mqtt/shazam2mqttbridges.Dockerfile+docker-compose.yml, GHCR build workflow, and HA docs with a dashboard card + Energy-dashboard recipe.guess/utils/mqtt_client/config) no longer imports OVOS; the PHAL sensor integration moved behind thephalextra.Modernization
pyproject(dynamic version), Apache-2.0, gh-automations reusable CI@dev./sysreads mocked) — 19 tests, 68% coverage.Bugs fixed along the way
from distutils.spawn import find_executable→shutil.which(distutils is removed in 3.12+, so the package failed to import on the CI matrix).transform_rangewas missing the output offset — the idle estimate returned 0 W instead of idle power.guesstimatecrashed; now falls back to a generic profile.pi3b+.json/pi2.json→pi3bplus.json/pi2b.json).🤖 Generated with Claude Code