A HACS-installable custom integration based on Home Assistant's built-in Mopeka Bluetooth integration, with a configurable minimum reading-quality threshold.
This integration uses its own mopeka_quality domain, so it can coexist with Home Assistant Core's built-in mopeka integration instead of overriding it.
- Based on the current Home Assistant Core Mopeka integration.
- Separate
mopeka_qualitydomain. - Passive Bluetooth discovery and UI configuration.
- Configurable tank medium type.
- Configurable Required quality % (0–100, default 100%).
- Sensor readings below the configured quality threshold become
unknown. - The
reading_qualitydiagnostic sensor remains available so rejected readings can be diagnosed. - HACS-compatible repository layout and validation workflow.
- Automated semantic patch releases with
manifest.jsonkept in sync with the GitHub release version. - Tests for configuration, filtering, migration, domain identity, and release version handling.
Mopeka reports reading quality as 0%, 33%, 67%, or 100%. A measurement is accepted when its reading_quality is at least the configured Required quality %. The default of 100% therefore accepts only 100%-quality measurements.
The reading_quality sensor itself is never filtered. All other values from the same advertisement are set to unknown when the quality is below the threshold.
- Open HACS.
- Add
https://github.com/danfulton72/mopeka_custom_componentas a Custom repository of type Integration. - Install Mopeka Quality Filter.
- Restart Home Assistant.
- Go to Settings → Devices & services and configure/discover your Mopeka sensor under Mopeka Quality Filter.
- Use the integration's Configure action to change the medium or Required quality %.
Copy custom_components/mopeka_quality into your Home Assistant configuration directory as:
/config/custom_components/mopeka_quality
Restart Home Assistant.
Home Assistant config entries are bound to their integration domain. Entries created by an earlier build that used the mopeka domain are not automatically reassigned to mopeka_quality; remove/re-add that custom integration entry after upgrading to this domain-renamed release.
Create a virtual environment and install the test dependencies:
python -m pip install -r requirements_test.txt
pytestThe CI workflow also runs Hassfest and the HACS validation action.
Every merged pull request to main runs the release workflow. The workflow:
- Reads the latest GitHub release tag (the source of truth).
- Increments the patch component (
x.y.z→x.y.(z+1)). - Writes that exact version to
custom_components/mopeka_quality/manifest.json. - Commits the manifest update.
- Tags the release commit and creates the matching GitHub release with generated notes.
If no GitHub release exists yet, the baseline is 0.0.0, so the first merged pull request creates 0.0.1.
Integration code is adapted from the Apache-2.0 licensed Home Assistant Core Mopeka integration: homeassistant/components/mopeka.
The Bluetooth parser dependency is mopeka-iot-ble.
Apache License 2.0. See LICENSE.