From 14330fbd9381e603de5527a6399caa06be7fc318 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 24 Apr 2020 13:36:10 +0200 Subject: [PATCH] Fix include domains on entity picker (#5615) --- .../automation/action/types/ha-automation-action-scene.ts | 4 +++- .../condition/types/ha-automation-condition-zone.ts | 4 +++- .../trigger/types/ha-automation-trigger-geo_location.ts | 4 +++- .../automation/trigger/types/ha-automation-trigger-zone.ts | 4 +++- src/panels/config/person/dialog-person-detail.ts | 4 +++- .../editor/config-elements/hui-alarm-panel-card-editor.ts | 4 +++- .../lovelace/editor/config-elements/hui-gauge-card-editor.ts | 4 +++- .../lovelace/editor/config-elements/hui-light-card-editor.ts | 4 +++- .../editor/config-elements/hui-media-control-card-editor.ts | 4 +++- .../editor/config-elements/hui-picture-entity-card-editor.ts | 4 +++- .../editor/config-elements/hui-picture-glance-card-editor.ts | 4 +++- .../editor/config-elements/hui-plant-status-card-editor.ts | 4 +++- .../lovelace/editor/config-elements/hui-sensor-card-editor.ts | 4 +++- .../editor/config-elements/hui-thermostat-card-editor.ts | 4 +++- .../config-elements/hui-weather-forecast-card-editor.ts | 4 +++- 15 files changed, 45 insertions(+), 15 deletions(-) diff --git a/src/panels/config/automation/action/types/ha-automation-action-scene.ts b/src/panels/config/automation/action/types/ha-automation-action-scene.ts index 36808b3bc5..b69808c522 100644 --- a/src/panels/config/automation/action/types/ha-automation-action-scene.ts +++ b/src/panels/config/automation/action/types/ha-automation-action-scene.ts @@ -6,6 +6,8 @@ import { PolymerChangedEvent } from "../../../../../polymer-types"; import { HomeAssistant } from "../../../../../types"; import { ActionElement } from "../ha-automation-action-row"; +const includeDomains = ["scene"]; + @customElement("ha-automation-action-scene") export class HaSceneAction extends LitElement implements ActionElement { @property() public hass!: HomeAssistant; @@ -24,7 +26,7 @@ export class HaSceneAction extends LitElement implements ActionElement { .hass=${this.hass} .value=${scene} @value-changed=${this._entityPicked} - include-domains="['scene']" + .includeDomains=${includeDomains} allow-custom-entity > `; diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-zone.ts b/src/panels/config/automation/condition/types/ha-automation-condition-zone.ts index d330d0b50a..2f7416f4e1 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-zone.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-zone.ts @@ -12,6 +12,8 @@ function zoneAndLocationFilter(stateObj) { return hasLocation(stateObj) && computeStateDomain(stateObj) !== "zone"; } +const includeDomains = ["zone"]; + @customElement("ha-automation-condition-zone") export class HaZoneCondition extends LitElement { @property() public hass!: HomeAssistant; @@ -46,7 +48,7 @@ export class HaZoneCondition extends LitElement { @value-changed=${this._zonePicked} .hass=${this.hass} allow-custom-entity - include-domains="['zone']" + .includeDomains=${includeDomains} >