Skip to content

feat: Capability-Based Entity Filtering (v0.5.0)#9

Merged
onpremcloudguy merged 1 commit into
mainfrom
006-capability-entity-filtering
Mar 28, 2026
Merged

feat: Capability-Based Entity Filtering (v0.5.0)#9
onpremcloudguy merged 1 commit into
mainfrom
006-capability-entity-filtering

Conversation

@onpremcloudguy
Copy link
Copy Markdown
Owner

Summary

Intelligent entity filtering based on vehicle hardware capabilities, trim level, and equipment detection. Vehicles only show entities for features they actually have.

Key Changes

  • Capability filtering - all 9 entity platforms check vehicle capability flags before creating entities
  • Sentinel value 101 - position fields returning 101 (not equipped) normalised to None; sunroof/curtain entities excluded on non-equipped vehicles
  • V2-to-V1 capability mapping - 10-entry alias dict + 3 inferred capabilities
  • Vehicle model/edition detection - VehicleModel and VehicleEdition enums from matCode
  • Edition-based filtering - PM2.5 sensors excluded on Pure/Pro, seat heating on Pure
  • Hardware equipment filtering - equipped_fn callback with stale entity registry cleanup
  • Static data caching - capabilities, ability, plant_no cached after first fetch (3 fewer API calls per poll)
  • Frontend fixes - custom cards registered as Lovelace resources (fixes race condition on hard refresh); connectedCallback + loading placeholder; async_setup early registration
  • Default capability changed - unknown capabilities default to False (safe-by-default)
  • Dashboard conditionals - sunroof cards wrapped in conditional for non-equipped vehicles
  • API documentation - matCode decoding, sentinel values, V2-V1 mapping, command parameters

Entity Impact

  • Added: 2 diagnostic sensors (vehicle_model, vehicle_edition)
  • Removed (on test vehicle without sunroof): 6 sunroof/curtain entities + 1 stale washer_fluid
  • Net: 192 entities (from 197)
  • Fully-equipped vehicles: zero regression

Spec

Implements specs/006-capability-entity-filtering - all 21 tasks complete, all 5 success criteria met.

@onpremcloudguy onpremcloudguy merged commit 8969b48 into main Mar 28, 2026
2 of 4 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.

2 participants