Convert entity picker to ha-combo (#11560)

* Convert entity picker to ha-combo

* Update ha-entity-picker.ts

* Handle empty better

* Clear value when no device/area/entity
This commit is contained in:
Bram Kragten
2022-02-07 10:59:11 +01:00
committed by GitHub
parent d05f807b9d
commit 76af6e48cd
6 changed files with 77 additions and 129 deletions

View File

@@ -31,11 +31,7 @@ export class HaSelector extends LitElement {
@property({ type: Boolean }) public disabled = false;
public focus() {
const input = this.shadowRoot!.getElementById("selector");
if (!input) {
return;
}
(input as HTMLElement).focus();
this.shadowRoot!.getElementById("selector")?.focus();
}
private get _type() {