mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Fix include domains on entity picker (#5615)
This commit is contained in:
parent
bf55be7f7f
commit
14330fbd93
@ -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
|
||||
></ha-entity-picker>
|
||||
`;
|
||||
|
@ -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}
|
||||
></ha-entity-picker>
|
||||
<label id="eventlabel">
|
||||
${this.hass.localize(
|
||||
|
@ -8,6 +8,8 @@ import type { GeoLocationTrigger } from "../../../../../data/automation";
|
||||
import type { HomeAssistant } from "../../../../../types";
|
||||
import { handleChangeEvent } from "../ha-automation-trigger-row";
|
||||
|
||||
const includeDomains = ["zone"];
|
||||
|
||||
@customElement("ha-automation-trigger-geo_location")
|
||||
export default class HaGeolocationTrigger extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@ -42,7 +44,7 @@ export default class HaGeolocationTrigger extends LitElement {
|
||||
@value-changed=${this._zonePicked}
|
||||
.hass=${this.hass}
|
||||
allow-custom-entity
|
||||
include-domains="['zone']"
|
||||
.includeDomains=${includeDomains}
|
||||
></ha-entity-picker>
|
||||
<label id="eventlabel">
|
||||
${this.hass.localize(
|
||||
|
@ -14,6 +14,8 @@ function zoneAndLocationFilter(stateObj) {
|
||||
return hasLocation(stateObj) && computeStateDomain(stateObj) !== "zone";
|
||||
}
|
||||
|
||||
const includeDomains = ["zone"];
|
||||
|
||||
@customElement("ha-automation-trigger-zone")
|
||||
export class HaZoneTrigger extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
@ -49,7 +51,7 @@ export class HaZoneTrigger extends LitElement {
|
||||
@value-changed=${this._zonePicked}
|
||||
.hass=${this.hass}
|
||||
allow-custom-entity
|
||||
include-domains="['zone']"
|
||||
.includeDomains=${includeDomains}
|
||||
></ha-entity-picker>
|
||||
<label id="eventlabel">
|
||||
${this.hass.localize(
|
||||
|
@ -18,6 +18,8 @@ import { haStyleDialog } from "../../../resources/styles";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { PersonDetailDialogParams } from "./show-dialog-person-detail";
|
||||
|
||||
const includeDomains = ["device_tracker"];
|
||||
|
||||
class DialogPersonDetail extends LitElement {
|
||||
@property() public hass!: HomeAssistant;
|
||||
|
||||
@ -106,7 +108,7 @@ class DialogPersonDetail extends LitElement {
|
||||
<ha-entities-picker
|
||||
.hass=${this.hass}
|
||||
.value=${this._deviceTrackers}
|
||||
.include-domains=${["device_tracker"]}
|
||||
.includeDomains=${includeDomains}
|
||||
.pickedEntityLabel=${this.hass.localize(
|
||||
"ui.panel.config.person.detail.device_tracker_picked"
|
||||
)}
|
||||
|
@ -29,6 +29,8 @@ const cardConfigStruct = struct({
|
||||
theme: "string?",
|
||||
});
|
||||
|
||||
const includeDomains = ["alarm_control_panel"];
|
||||
|
||||
@customElement("hui-alarm-panel-card-editor")
|
||||
export class HuiAlarmPanelCardEditor extends LitElement
|
||||
implements LovelaceCardEditor {
|
||||
@ -76,7 +78,7 @@ export class HuiAlarmPanelCardEditor extends LitElement
|
||||
.hass=${this.hass}
|
||||
.value="${this._entity}"
|
||||
.configValue=${"entity"}
|
||||
.include-domains=${["alarm_control_panel"]}
|
||||
.includeDomains=${includeDomains}
|
||||
@change="${this._valueChanged}"
|
||||
allow-custom-entity
|
||||
></ha-entity-picker>
|
||||
|
@ -30,6 +30,8 @@ const cardConfigStruct = struct({
|
||||
theme: "string?",
|
||||
});
|
||||
|
||||
const includeDomains = ["sensor"];
|
||||
|
||||
@customElement("hui-gauge-card-editor")
|
||||
export class HuiGaugeCardEditor extends LitElement
|
||||
implements LovelaceCardEditor {
|
||||
@ -87,7 +89,7 @@ export class HuiGaugeCardEditor extends LitElement
|
||||
.hass=${this.hass}
|
||||
.value="${this._entity}"
|
||||
.configValue=${"entity"}
|
||||
.include-domains=${["sensor"]}
|
||||
.includeDomains=${includeDomains}
|
||||
@change="${this._valueChanged}"
|
||||
allow-custom-entity
|
||||
></ha-entity-picker>
|
||||
|
@ -34,6 +34,8 @@ const cardConfigStruct = struct({
|
||||
double_tap_action: struct.optional(actionConfigStruct),
|
||||
});
|
||||
|
||||
const includeDomains = ["light"];
|
||||
|
||||
@customElement("hui-light-card-editor")
|
||||
export class HuiLightCardEditor extends LitElement
|
||||
implements LovelaceCardEditor {
|
||||
@ -95,7 +97,7 @@ export class HuiLightCardEditor extends LitElement
|
||||
.hass=${this.hass}
|
||||
.value=${this._entity}
|
||||
.configValue=${"entity"}
|
||||
.include-domains=${["light"]}
|
||||
.includeDomains=${includeDomains}
|
||||
@change=${this._valueChanged}
|
||||
allow-custom-entity
|
||||
></ha-entity-picker>
|
||||
|
@ -18,6 +18,8 @@ const cardConfigStruct = struct({
|
||||
entity: "string?",
|
||||
});
|
||||
|
||||
const includeDomains = ["media_player"];
|
||||
|
||||
@customElement("hui-media-control-card-editor")
|
||||
export class HuiMediaControlCardEditor extends LitElement
|
||||
implements LovelaceCardEditor {
|
||||
@ -50,7 +52,7 @@ export class HuiMediaControlCardEditor extends LitElement
|
||||
.hass=${this.hass}
|
||||
.value="${this._entity}"
|
||||
.configValue=${"entity"}
|
||||
.include-domains=${["media_player"]}
|
||||
.includeDomains=${includeDomains}
|
||||
@change="${this._valueChanged}"
|
||||
allow-custom-entity
|
||||
></ha-entity-picker>
|
||||
|
@ -41,6 +41,8 @@ const cardConfigStruct = struct({
|
||||
theme: "string?",
|
||||
});
|
||||
|
||||
const includeDomains = ["camera"];
|
||||
|
||||
@customElement("hui-picture-entity-card-editor")
|
||||
export class HuiPictureEntityCardEditor extends LitElement
|
||||
implements LovelaceCardEditor {
|
||||
@ -150,7 +152,7 @@ export class HuiPictureEntityCardEditor extends LitElement
|
||||
.value="${this._camera_image}"
|
||||
.configValue=${"camera_image"}
|
||||
@change="${this._valueChanged}"
|
||||
.include-domains=${["camera"]}
|
||||
.includeDomains=${includeDomains}
|
||||
allow-custom-entity
|
||||
></ha-entity-picker>
|
||||
<div class="side-by-side">
|
||||
|
@ -43,6 +43,8 @@ const cardConfigStruct = struct({
|
||||
theme: "string?",
|
||||
});
|
||||
|
||||
const includeDomains = ["camera"];
|
||||
|
||||
@customElement("hui-picture-glance-card-editor")
|
||||
export class HuiPictureGlanceCardEditor extends LitElement
|
||||
implements LovelaceCardEditor {
|
||||
@ -150,7 +152,7 @@ export class HuiPictureGlanceCardEditor extends LitElement
|
||||
.configValue=${"camera_image"}
|
||||
@change="${this._valueChanged}"
|
||||
allow-custom-entity
|
||||
.include-domains=${["camera"]}
|
||||
.includeDomains=${includeDomains}
|
||||
></ha-entity-picker>
|
||||
<div class="side-by-side">
|
||||
<paper-dropdown-menu
|
||||
|
@ -24,6 +24,8 @@ const cardConfigStruct = struct({
|
||||
theme: "string?",
|
||||
});
|
||||
|
||||
const includeDomains = ["plant"];
|
||||
|
||||
@customElement("hui-plant-status-card-editor")
|
||||
export class HuiPlantStatusCardEditor extends LitElement
|
||||
implements LovelaceCardEditor {
|
||||
@ -65,7 +67,7 @@ export class HuiPlantStatusCardEditor extends LitElement
|
||||
.hass=${this.hass}
|
||||
.value="${this._entity}"
|
||||
.configValue=${"entity"}
|
||||
.include-domains=${["plant"]}
|
||||
.includeDomains=${includeDomains}
|
||||
@change="${this._valueChanged}"
|
||||
allow-custom-entity
|
||||
></ha-entity-picker>
|
||||
|
@ -33,6 +33,8 @@ const cardConfigStruct = struct({
|
||||
hours_to_show: "number?",
|
||||
});
|
||||
|
||||
const includeDomains = ["sensor"];
|
||||
|
||||
@customElement("hui-sensor-card-editor")
|
||||
export class HuiSensorCardEditor extends LitElement
|
||||
implements LovelaceCardEditor {
|
||||
@ -96,7 +98,7 @@ export class HuiSensorCardEditor extends LitElement
|
||||
.hass=${this.hass}
|
||||
.value="${this._entity}"
|
||||
.configValue=${"entity"}
|
||||
.include-domains=${["sensor"]}
|
||||
.includeDomains=${includeDomains}
|
||||
@change="${this._valueChanged}"
|
||||
allow-custom-entity
|
||||
></ha-entity-picker>
|
||||
|
@ -23,6 +23,8 @@ const cardConfigStruct = struct({
|
||||
theme: "string?",
|
||||
});
|
||||
|
||||
const includeDomains = ["climate"];
|
||||
|
||||
@customElement("hui-thermostat-card-editor")
|
||||
export class HuiThermostatCardEditor extends LitElement
|
||||
implements LovelaceCardEditor {
|
||||
@ -64,7 +66,7 @@ export class HuiThermostatCardEditor extends LitElement
|
||||
.hass=${this.hass}
|
||||
.value="${this._entity}"
|
||||
.configValue=${"entity"}
|
||||
.include-domains=${["climate"]}
|
||||
.includeDomains=${includeDomains}
|
||||
@change="${this._valueChanged}"
|
||||
allow-custom-entity
|
||||
></ha-entity-picker>
|
||||
|
@ -25,6 +25,8 @@ const cardConfigStruct = struct({
|
||||
show_forecast: "boolean?",
|
||||
});
|
||||
|
||||
const includeDomains = ["weather"];
|
||||
|
||||
@customElement("hui-weather-forecast-card-editor")
|
||||
export class HuiWeatherForecastCardEditor extends LitElement
|
||||
implements LovelaceCardEditor {
|
||||
@ -70,7 +72,7 @@ export class HuiWeatherForecastCardEditor extends LitElement
|
||||
.hass=${this.hass}
|
||||
.value=${this._entity}
|
||||
.configValue=${"entity"}
|
||||
.includeDomains=${["weather"]}
|
||||
.includeDomains=${includeDomains}
|
||||
@change=${this._valueChanged}
|
||||
allow-custom-entity
|
||||
></ha-entity-picker>
|
||||
|
Loading…
x
Reference in New Issue
Block a user