feat(rmm): Radar Map Manager compatibility (additive)#2
Merged
Conversation
Make the integration work with Moe8383/radar_map_manager, which reads each radar by entity-id convention sensor.<radar>_target_<n>_x/_y (mm). - Enable the per-target X/Y sensors by default (RMM reads them; mm is used as-is). New `none_when_absent` flag makes empty target slots report `unknown` so RMM skips them cleanly instead of seeing (0,0). - Add `presence_target_count` sensor (0..3 currently present targets). - README: RMM section incl. the locale caveat (HA builds the entity-id suffix from the translated entity name, so non-English installs must rename the X/Y entity-ids to the literal `_target_<n>_x/_y` form). - Add tests/test_sensor.py (X/Y enabled + mm + none-when-absent, count). No BLE changes, no renamed/removed entities, no breaking changes. Verified end-to-end on real HLK-LD2450 hardware: RMM's FusionEngine reads the live coordinates and fuses them into its master sensor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add an options flow toggle "Radar Map Manager support" (default OFF) so non-RMM users keep a clean entity list. - When OFF (default): per-target X/Y sensors are disabled by default and no presence_target_count sensor is created (original behaviour). - When ON: X/Y sensors are enabled and presence_target_count is added. - Toggling reloads the config entry (options update listener). - const: CONF_ENABLE_RMM / DEFAULT_ENABLE_RMM (False). - config_flow: OptionsFlow with the boolean; strings + en/de translations. - README: documents the opt-in step. - tests: option gating of X/Y enable-default + count, and an options-flow round-trip test. Full suite: 42 passed; ruff clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Radar Map Manager (RMM) compatibility
Makes the integration work with Moe8383/radar_map_manager, which reads each radar by the entity-id convention
sensor.<radar>_target_<n>_x/_y(in mm).Changes (additive — no BLE changes, no renamed/removed entities, no breaking changes)
mmas-is). Newnone_when_absentflag makes empty target slots reportunknownso RMM skips them cleanly instead of seeing(0, 0).presence_target_countsensor (0–3 currently present targets)._target_<n>_x/_yform.tests/test_sensor.py(X/Y enabled + mm unit + none-when-absent, count 0–3). Full suite: 40 passed; ruff clean.Verified end-to-end on real hardware
On a live HLK-LD2450, RMM's own
FusionEngine._get_radar_point()read the live coordinates exactly (e.g.(-513, 2210) mm), empty slots were skipped, and RMM fused the radar into its master sensor (count = 1). No MQTT required for entity-based radars.🤖 Generated with Claude Code