Update Pickers and selectors with required (#12151)

* Update Pickers and selectors with required

* Use native * for device and entity
This commit is contained in:
Zack Barett
2022-03-30 06:48:56 -05:00
committed by GitHub
parent f5af63a50e
commit 7ab54ee5ce
35 changed files with 159 additions and 50 deletions

View File

@@ -35,6 +35,8 @@ export class HaMediaSelector extends LitElement {
@property({ type: Boolean, reflect: true }) public disabled = false;
@property({ type: Boolean, reflect: true }) public required = true;
@state() private _thumbnailUrl?: string | null;
willUpdate(changedProps: PropertyValues<this>) {
@@ -84,6 +86,7 @@ export class HaMediaSelector extends LitElement {
.label=${this.label ||
this.hass.localize("ui.components.selectors.media.pick_media_player")}
.disabled=${this.disabled}
.required=${this.required}
include-domains='["media_player"]'
allow-custom-entity
@value-changed=${this._entityChanged}