Add custom element decorators instead of customElements.define #28235
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.
Breaking change
Proposed change
Replace direct customElements.define() calls with the
@customElementdecorator from lit/decorators across 32 files.Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed:
Note
Replaces direct
customElements.definecalls with Lit@customElementdecorators across components, dialogs, panels, Lovelace cards/views, and utilities; updates imports accordingly.customElements.define(...)with Lit@customElement(...)across:state-history-chart-line,state-badge,ha-entity-marker,notification-manager,ha-init-page.more-info-*(camera, climate, group, humidifier),dialog-*(calendar event detail, area/floor/person/zone details, schedule block info, manage cloudhook, system log detail, home/zone detail).ha-panel-history,ha-panel-custom, Lovelace views (hui-masonry-view,hui-panel-view,hui-sidebar-view).hui-grid-card,hui-vertical-stack-card,hui-conditional-element.action-handlerdirective element.customElementfromlit/decoratorsand remove trailing manual registrations.Written by Cursor Bugbot for commit 3051828. This will update automatically on new commits. Configure here.