Skip to content

Conversation

@cayossarian
Copy link
Member

@cayossarian cayossarian commented Jan 21, 2026

Note

Bug fixes and reliability improvements (v1.3.1)

  • Prevents reload loops/flicker by using a sentinel (_NAME_UNSET) and allowing None entity names so HA defaults apply (select.py, switch.py, sensors/base.py, sensors/circuit.py).
  • Respects user-customized friendly names by skipping auto-sync when an override exists (checks HA entity registry).
  • Improves cleanup_energy_spikes service:
    • Finds SPAN energy sensors via entity registry, supporting legacy names without span_panel_ prefix.
    • Adds optional main_meter_entity_id parameter with validation and clearer error responses; updates services.yaml and handler.
  • Updates tests to cover legacy sensor discovery, parameter validation, and new detection/adjustment flows.
  • Bumps integration version to 1.3.1 in manifest.json; updates CHANGELOG.md.

Written by Cursor Bugbot for commit 7ad7340. This will update automatically on new commits. Configure here.

- Use entity registry to find sensors by config entry instead of entity ID prefix
- Correctly handles all naming patterns including legacy names without span_panel_ prefix
- Add optional main_meter_entity_id parameter for manual sensor selection
- Include available_sensors list in error responses for better debugging

Closes #160
- Use sentinel value to distinguish 'never synced' from 'circuit name is None'
- Set entity name to None when circuit.name is None to let HA use default behavior
- Respect user-customized entity names by checking HA entity registry
- Skip sync for entities with user overrides while still tracking panel names

This fixes the infinite reload loop and entity flickering when SPAN panel
API returns None for circuit names. Also preserves user customizations.

Closes #162
@cayossarian cayossarian merged commit d47b40e into main Jan 21, 2026
8 checks passed
@cayossarian cayossarian deleted the 1_31 branch January 21, 2026 22:10
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.

2 participants