-
Notifications
You must be signed in to change notification settings - Fork 0
feat: support HA EntityConfig format for entities #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Accept both string[] and EntityConfig[] formats for entities config:
- "sensor.power_*" (string with wildcard)
- { entity: "sensor.x", name: "Y" } (HA standard format)
This enables auto-entities compatibility and follows HA conventions.
Uses official EntityConfig from custom-card-helpers package.
Closes #24
🦋 Changeset detectedLatest commit: e1870a4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
- name: overrides friendly_name for label - icon: overrides entity's default icon This enables full HA EntityConfig support, not just format compatibility. Users can now customize labels and icons per-entity.
- Add auto-entities mention in "Why Treemap Card?" section - New "Auto-Entities Integration" section with examples - Update Data Source table with EntityConfig format - Add note to Order & Filter about entity-level filtering
- Replace manual CustomEvent with fireEvent helper - Replace manual setTimeout debounce with debounce helper - Removed ~15 lines of boilerplate code
Closed
- Editor properly extracts entity IDs from auto-entities format - Previously displayed [object Object] for EntityConfig objects - Added 2 tests for EntityConfig and mixed format display
c636e72 to
71e1386
Compare
- Created docs/auto-entities-guide.md with full examples - Simplified main README to brief mention with link - Power users can find detailed YAML examples in guide
71e1386 to
97cb4e2
Compare
Previously icon.icon always won. Now: entity icon > global icon.icon
Cleaner approach - all entity data stays together:
- _normalizeEntity now returns { entity, name?, icon? }
- No need to re-extract overrides from original input
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.
Summary
string[]andEntityConfig[]formats for entities confignameandiconoverrides from EntityConfig actually workEntityConfig,fireEvent,debouncefromcustom-card-helpersEntity Config Format
Auto-entities Integration