Skip to content

Bugfix/sorting and flow fixes - #1673

Open
mrueg wants to merge 3 commits into
Tasshack:devfrom
mrueg:bugfix/sorting-and-flow-fixes
Open

Bugfix/sorting and flow fixes#1673
mrueg wants to merge 3 commits into
Tasshack:devfrom
mrueg:bugfix/sorting-and-flow-fixes

Conversation

@mrueg

@mrueg mrueg commented Jun 22, 2026

Copy link
Copy Markdown
  • Fixed TypeError in _notification_dismiss_listener : Safe checks were introduced in coordinator.py to prevent crashes when notification configurations are stored as booleans (preventing TypeError: argument of type 'bool' is not iterable ).
  • Fixed State Pollution in Config Flow Steps: Replaced shared mutable default dictionary arguments {} in config_flow.py step functions with None , and initialized them inside the methods. This avoids state leakage between flows.
  • Optimized and Fixed Sorting Algorithms: In device.py and map.py, replaced expensive and mathematically incorrect cmp_to_key sorting comparators with native Python tuple keys. This fixes:
    - Pixel coordinate sorting stability issues (which violated strict weak ordering invariants).
    - Recovery map sorting symmetry/asymmetry bugs.
    - Significant performance overhead (a 10x to 50x speedup on sorting arrays, helping reduce CPU spikes during map updates in Home Assistant).

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