Skip to content

feat(rmm): Radar Map Manager compatibility (additive)#2

Merged
magicx78 merged 2 commits into
mainfrom
feature/radar-map-manager-support
Jun 3, 2026
Merged

feat(rmm): Radar Map Manager compatibility (additive)#2
magicx78 merged 2 commits into
mainfrom
feature/radar-map-manager-support

Conversation

@magicx78

@magicx78 magicx78 commented Jun 3, 2026

Copy link
Copy Markdown
Owner

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)

  • Enable the per-target X/Y sensors by default. They already emitted the exact ids RMM looks for, in millimetres (RMM uses mm as-is). New none_when_absent flag makes empty target slots report unknown so RMM skips them cleanly instead of seeing (0, 0).
  • New presence_target_count sensor (0–3 currently present targets).
  • README: RMM section incl. a language 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.
  • Tests: 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

magicx78 and others added 2 commits June 3, 2026 19:19
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>
@magicx78 magicx78 merged commit 8e6e13a into main Jun 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant