From 12064a086b93b022ae0023229b8e7762154a35ad Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 19 Feb 2019 09:09:07 -0800 Subject: [PATCH] Fix attribute-prop mapping (#2794) --- src/components/entity/ha-entities-picker.ts | 7 ++++--- src/components/entity/ha-entity-picker.ts | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/entity/ha-entities-picker.ts b/src/components/entity/ha-entities-picker.ts index 5fe0720c95..684ef67dc1 100644 --- a/src/components/entity/ha-entities-picker.ts +++ b/src/components/entity/ha-entities-picker.ts @@ -22,9 +22,10 @@ import { HassEntity } from "home-assistant-js-websocket"; class HaEntitiesPickerLight extends LitElement { @property() public hass?: HomeAssistant; @property() public value?: string[]; - @property() public domainFilter?: string; - @property() public pickedEntityLabel?: string; - @property() public pickEntityLabel?: string; + @property({ attribute: "domain-filter" }) public domainFilter?: string; + @property({ attribute: "picked-entity-label" }) + public pickedEntityLabel?: string; + @property({ attribute: "pick-entity-label" }) public pickEntityLabel?: string; protected render(): TemplateResult | void { if (!this.hass) { diff --git a/src/components/entity/ha-entity-picker.ts b/src/components/entity/ha-entity-picker.ts index 3b5bf7ed88..53f0b74db2 100644 --- a/src/components/entity/ha-entity-picker.ts +++ b/src/components/entity/ha-entity-picker.ts @@ -55,11 +55,12 @@ const rowRenderer = ( class HaEntityPicker extends LitElement { @property({ type: Boolean }) public autofocus?: boolean; @property({ type: Boolean }) public disabled?: boolean; - @property({ type: Boolean }) public allowCustomEntity; + @property({ type: Boolean, attribute: "allow-custom-entity" }) + public allowCustomEntity; @property() public hass?: HomeAssistant; @property() public label?: string; @property() public value?: string; - @property() public domainFilter?: string; + @property({ attribute: "domain-filter" }) public domainFilter?: string; @property() public entityFilter?: HaEntityPickerEntityFilterFunc; @property({ type: Boolean }) private _opened?: boolean; @property() private _hass?: HomeAssistant;