From e1bf33c82281d856634ccf97907ce90884b73f3b Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Mon, 3 Feb 2020 22:37:57 -0600 Subject: [PATCH 01/10] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20change=20call-servic?= =?UTF-8?q?e=20row=20to=20button=20row?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/panels/lovelace/common/call-service.ts | 4 +- .../create-element/create-row-element.ts | 2 + src/panels/lovelace/entity-rows/types.ts | 10 +-- .../lovelace/special-rows/hui-button-row.ts | 87 +++++++++++++++++++ .../special-rows/hui-call-service-row.ts | 82 +---------------- 5 files changed, 99 insertions(+), 86 deletions(-) create mode 100644 src/panels/lovelace/special-rows/hui-button-row.ts diff --git a/src/panels/lovelace/common/call-service.ts b/src/panels/lovelace/common/call-service.ts index de3b39984bb7..b67bdbce084a 100644 --- a/src/panels/lovelace/common/call-service.ts +++ b/src/panels/lovelace/common/call-service.ts @@ -1,8 +1,8 @@ import { HomeAssistant } from "../../../types"; -import { CallServiceConfig } from "../entity-rows/types"; +import { ButtonRowConfig } from "../entity-rows/types"; export const callService = ( - config: CallServiceConfig, + config: ButtonRowConfig, hass: HomeAssistant ): void => { const entityId = config.entity; diff --git a/src/panels/lovelace/create-element/create-row-element.ts b/src/panels/lovelace/create-element/create-row-element.ts index d23464f7fb00..126b14a982d7 100644 --- a/src/panels/lovelace/create-element/create-row-element.ts +++ b/src/panels/lovelace/create-element/create-row-element.ts @@ -4,6 +4,7 @@ import "../entity-rows/hui-script-entity-row"; import "../entity-rows/hui-sensor-entity-row"; import "../entity-rows/hui-text-entity-row"; import "../entity-rows/hui-toggle-entity-row"; +import "../special-rows/hui-button-row"; import "../special-rows/hui-call-service-row"; import { EntityConfig } from "../entity-rows/types"; import { createLovelaceElement } from "./create-element-base"; @@ -15,6 +16,7 @@ const ALWAYS_LOADED_TYPES = new Set([ "sensor-entity", "text-entity", "toggle-entity", + "button-row", "call-service", ]); const LAZY_LOAD_TYPES = { diff --git a/src/panels/lovelace/entity-rows/types.ts b/src/panels/lovelace/entity-rows/types.ts index f620fb4d496d..b6db65a7efff 100644 --- a/src/panels/lovelace/entity-rows/types.ts +++ b/src/panels/lovelace/entity-rows/types.ts @@ -28,8 +28,8 @@ export interface WeblinkConfig { icon?: string; url: string; } -export interface CallServiceConfig extends EntityConfig { - type: "call-service"; +export interface ButtonRowConfig extends EntityConfig { + type: "button" | "call-service"; action_name?: string; service: string; service_data?: { [key: string]: any }; @@ -52,10 +52,10 @@ export type LovelaceRowConfig = | DividerConfig | SectionConfig | WeblinkConfig - | CallServiceConfig - | CastConfig | ButtonsRowConfig - | ConditionalRowConfig; + | ConditionalRowConfig + | ButtonRowConfig + | CastConfig; export interface LovelaceRow extends HTMLElement { hass?: HomeAssistant; diff --git a/src/panels/lovelace/special-rows/hui-button-row.ts b/src/panels/lovelace/special-rows/hui-button-row.ts new file mode 100644 index 000000000000..dcba392a0d66 --- /dev/null +++ b/src/panels/lovelace/special-rows/hui-button-row.ts @@ -0,0 +1,87 @@ +import { + html, + LitElement, + TemplateResult, + customElement, + property, + css, + CSSResult, +} from "lit-element"; +import "@material/mwc-button"; + +import "../../../components/ha-icon"; + +import { callService } from "../common/call-service"; +import { LovelaceRow, ButtonRowConfig } from "../entity-rows/types"; +import { HomeAssistant } from "../../../types"; + +@customElement("hui-button-row") +export class HuiButtonRow extends LitElement implements LovelaceRow { + public hass?: HomeAssistant; + @property() private _config?: ButtonRowConfig; + + public setConfig(config: ButtonRowConfig): void { + if (!config || !config.name || !config.service) { + throw new Error("Error in card configuration."); + } + + this._config = { icon: "hass:remote", ...config }; + } + + protected render(): TemplateResult { + if (!this._config) { + return html``; + } + + return html` + +
+
${this._config.name}
+ ${this._config.action_name + ? this._config.action_name + : this.hass!.localize("ui.card.service.run")} +
+ `; + } + + static get styles(): CSSResult { + return css` + :host { + display: flex; + align-items: center; + } + ha-icon { + padding: 8px; + color: var(--paper-item-icon-color); + } + .flex { + flex: 1; + overflow: hidden; + margin-left: 16px; + display: flex; + justify-content: space-between; + align-items: center; + } + .flex div { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + mwc-button { + margin-right: -0.57em; + } + `; + } + + private _callService() { + callService(this._config!, this.hass!); + } +} + +declare global { + interface HTMLElementTagNameMap { + "hui-button-row": HuiButtonRow; + } +} diff --git a/src/panels/lovelace/special-rows/hui-call-service-row.ts b/src/panels/lovelace/special-rows/hui-call-service-row.ts index a1e20b5fb2bd..15507a9f5c07 100644 --- a/src/panels/lovelace/special-rows/hui-call-service-row.ts +++ b/src/panels/lovelace/special-rows/hui-call-service-row.ts @@ -1,85 +1,9 @@ -import { - html, - LitElement, - TemplateResult, - customElement, - property, - css, - CSSResult, -} from "lit-element"; -import "@material/mwc-button"; +import { customElement } from "lit-element"; -import "../../../components/ha-icon"; - -import { callService } from "../common/call-service"; -import { LovelaceRow, CallServiceConfig } from "../entity-rows/types"; -import { HomeAssistant } from "../../../types"; +import { HuiButtonRow } from "./hui-button-row"; @customElement("hui-call-service-row") -class HuiCallServiceRow extends LitElement implements LovelaceRow { - public hass?: HomeAssistant; - - @property() private _config?: CallServiceConfig; - - public setConfig(config: CallServiceConfig): void { - if (!config || !config.name || !config.service) { - throw new Error("Error in card configuration."); - } - - this._config = { icon: "hass:remote", ...config }; - } - - protected render(): TemplateResult { - if (!this._config) { - return html``; - } - - return html` - -
-
${this._config.name}
- ${this._config.action_name - ? this._config.action_name - : this.hass!.localize("ui.card.service.run")} -
- `; - } - - static get styles(): CSSResult { - return css` - :host { - display: flex; - align-items: center; - } - ha-icon { - padding: 8px; - color: var(--paper-item-icon-color); - } - .flex { - flex: 1; - overflow: hidden; - margin-left: 16px; - display: flex; - justify-content: space-between; - align-items: center; - } - .flex div { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - mwc-button { - margin-right: -0.57em; - } - `; - } - - private _callService() { - callService(this._config!, this.hass!); - } -} +class HuiCallServiceRow extends HuiButtonRow {} declare global { interface HTMLElementTagNameMap { From d43a541266998d3e93d627fc9e791b065d1ca8f6 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Fri, 14 Feb 2020 22:52:42 -0600 Subject: [PATCH 02/10] address comments --- src/panels/lovelace/entity-rows/types.ts | 3 ++- .../lovelace/special-rows/hui-button-row.ts | 26 +++++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/panels/lovelace/entity-rows/types.ts b/src/panels/lovelace/entity-rows/types.ts index b6db65a7efff..9362868cee20 100644 --- a/src/panels/lovelace/entity-rows/types.ts +++ b/src/panels/lovelace/entity-rows/types.ts @@ -1,5 +1,6 @@ import { HomeAssistant } from "../../../types"; import { Condition } from "../common/validate-condition"; +import { EntitiesCardEntityConfig } from "../cards/types"; export interface EntityConfig { entity: string; @@ -28,7 +29,7 @@ export interface WeblinkConfig { icon?: string; url: string; } -export interface ButtonRowConfig extends EntityConfig { +export interface ButtonRowConfig extends EntitiesCardEntityConfig { type: "button" | "call-service"; action_name?: string; service: string; diff --git a/src/panels/lovelace/special-rows/hui-button-row.ts b/src/panels/lovelace/special-rows/hui-button-row.ts index dcba392a0d66..08a5f30ea9e8 100644 --- a/src/panels/lovelace/special-rows/hui-button-row.ts +++ b/src/panels/lovelace/special-rows/hui-button-row.ts @@ -11,9 +11,12 @@ import "@material/mwc-button"; import "../../../components/ha-icon"; -import { callService } from "../common/call-service"; import { LovelaceRow, ButtonRowConfig } from "../entity-rows/types"; import { HomeAssistant } from "../../../types"; +import { actionHandler } from "../common/directives/action-handler-directive"; +import { hasAction } from "../common/has-action"; +import { ActionHandlerEvent } from "../../../data/lovelace"; +import { handleAction } from "../common/handle-action"; @customElement("hui-button-row") export class HuiButtonRow extends LitElement implements LovelaceRow { @@ -25,7 +28,15 @@ export class HuiButtonRow extends LitElement implements LovelaceRow { throw new Error("Error in card configuration."); } - this._config = { icon: "hass:remote", ...config }; + this._config = { + icon: "hass:remote", + tap_action: { + action: "call-service", + service: config.service, + service_data: config.service_data, + }, + ...config, + }; } protected render(): TemplateResult { @@ -37,7 +48,12 @@ export class HuiButtonRow extends LitElement implements LovelaceRow {
${this._config.name}
- ${this._config.action_name ? this._config.action_name : this.hass!.localize("ui.card.service.run")} Date: Fri, 14 Feb 2020 23:03:26 -0600 Subject: [PATCH 03/10] cleanup --- src/panels/lovelace/create-element/create-row-element.ts | 2 +- src/panels/lovelace/special-rows/hui-button-row.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panels/lovelace/create-element/create-row-element.ts b/src/panels/lovelace/create-element/create-row-element.ts index 126b14a982d7..a0614949af6a 100644 --- a/src/panels/lovelace/create-element/create-row-element.ts +++ b/src/panels/lovelace/create-element/create-row-element.ts @@ -16,7 +16,7 @@ const ALWAYS_LOADED_TYPES = new Set([ "sensor-entity", "text-entity", "toggle-entity", - "button-row", + "button", "call-service", ]); const LAZY_LOAD_TYPES = { diff --git a/src/panels/lovelace/special-rows/hui-button-row.ts b/src/panels/lovelace/special-rows/hui-button-row.ts index 08a5f30ea9e8..de7e9ca461b2 100644 --- a/src/panels/lovelace/special-rows/hui-button-row.ts +++ b/src/panels/lovelace/special-rows/hui-button-row.ts @@ -24,7 +24,7 @@ export class HuiButtonRow extends LitElement implements LovelaceRow { @property() private _config?: ButtonRowConfig; public setConfig(config: ButtonRowConfig): void { - if (!config || !config.name || !config.service) { + if (!config || !config.name || (!config.service && !config.tap_action)) { throw new Error("Error in card configuration."); } From 7fada237391ca026ae70effcc9a95b7483ac24ca Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Sat, 28 Mar 2020 20:19:49 -0500 Subject: [PATCH 04/10] address comments --- src/panels/lovelace/entity-rows/types.ts | 14 +++- .../lovelace/special-rows/hui-button-row.ts | 22 +++---- .../special-rows/hui-call-service-row.ts | 65 ++++++++++++++++++- 3 files changed, 84 insertions(+), 17 deletions(-) diff --git a/src/panels/lovelace/entity-rows/types.ts b/src/panels/lovelace/entity-rows/types.ts index 9362868cee20..bd255a4ba730 100644 --- a/src/panels/lovelace/entity-rows/types.ts +++ b/src/panels/lovelace/entity-rows/types.ts @@ -1,6 +1,6 @@ import { HomeAssistant } from "../../../types"; import { Condition } from "../common/validate-condition"; -import { EntitiesCardEntityConfig } from "../cards/types"; +import { ActionConfig } from "../../../data/lovelace"; export interface EntityConfig { entity: string; @@ -29,8 +29,15 @@ export interface WeblinkConfig { icon?: string; url: string; } -export interface ButtonRowConfig extends EntitiesCardEntityConfig { - type: "button" | "call-service"; +export interface ButtonRowConfig extends EntityConfig { + type: "button"; + action_name?: string; + tap_action?: ActionConfig; + hold_action?: ActionConfig; + double_tap_action?: ActionConfig; +} +export interface CallServiceRowConfig extends EntityConfig { + type: "call-service"; action_name?: string; service: string; service_data?: { [key: string]: any }; @@ -56,6 +63,7 @@ export type LovelaceRowConfig = | ButtonsRowConfig | ConditionalRowConfig | ButtonRowConfig + | CallServiceRowConfig | CastConfig; export interface LovelaceRow extends HTMLElement { diff --git a/src/panels/lovelace/special-rows/hui-button-row.ts b/src/panels/lovelace/special-rows/hui-button-row.ts index de7e9ca461b2..58fa793b62ba 100644 --- a/src/panels/lovelace/special-rows/hui-button-row.ts +++ b/src/panels/lovelace/special-rows/hui-button-row.ts @@ -24,19 +24,19 @@ export class HuiButtonRow extends LitElement implements LovelaceRow { @property() private _config?: ButtonRowConfig; public setConfig(config: ButtonRowConfig): void { - if (!config || !config.name || (!config.service && !config.tap_action)) { + if (!config) { throw new Error("Error in card configuration."); } - this._config = { - icon: "hass:remote", - tap_action: { - action: "call-service", - service: config.service, - service_data: config.service_data, - }, - ...config, - }; + if (!config.name) { + throw new Error("Error in card configuration. No name specified."); + } + + if (!config.tap_action) { + throw new Error("Error in card configuration. No action specified."); + } + + this._config = config; } protected render(): TemplateResult { @@ -45,7 +45,7 @@ export class HuiButtonRow extends LitElement implements LovelaceRow { } return html` - +
${this._config.name}
Date: Sat, 28 Mar 2020 20:26:37 -0500 Subject: [PATCH 05/10] remove unused function --- src/panels/lovelace/common/call-service.ts | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 src/panels/lovelace/common/call-service.ts diff --git a/src/panels/lovelace/common/call-service.ts b/src/panels/lovelace/common/call-service.ts deleted file mode 100644 index b67bdbce084a..000000000000 --- a/src/panels/lovelace/common/call-service.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { HomeAssistant } from "../../../types"; -import { ButtonRowConfig } from "../entity-rows/types"; - -export const callService = ( - config: ButtonRowConfig, - hass: HomeAssistant -): void => { - const entityId = config.entity; - const [domain, service] = config.service.split(".", 2); - const serviceData = { entity_id: entityId, ...config.service_data }; - hass.callService(domain, service, serviceData); -}; From 4cacf8960b35fdbb1b24a4acb58081600ef45bed Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Tue, 31 Mar 2020 21:23:15 -0500 Subject: [PATCH 06/10] address comments --- src/panels/lovelace/entity-rows/types.ts | 7 --- .../lovelace/special-rows/hui-button-row.ts | 2 +- .../special-rows/hui-call-service-row.ts | 58 +++++-------------- 3 files changed, 14 insertions(+), 53 deletions(-) diff --git a/src/panels/lovelace/entity-rows/types.ts b/src/panels/lovelace/entity-rows/types.ts index bd255a4ba730..4cf2995623ed 100644 --- a/src/panels/lovelace/entity-rows/types.ts +++ b/src/panels/lovelace/entity-rows/types.ts @@ -36,12 +36,6 @@ export interface ButtonRowConfig extends EntityConfig { hold_action?: ActionConfig; double_tap_action?: ActionConfig; } -export interface CallServiceRowConfig extends EntityConfig { - type: "call-service"; - action_name?: string; - service: string; - service_data?: { [key: string]: any }; -} export interface CastConfig { type: "cast"; icon: string; @@ -63,7 +57,6 @@ export type LovelaceRowConfig = | ButtonsRowConfig | ConditionalRowConfig | ButtonRowConfig - | CallServiceRowConfig | CastConfig; export interface LovelaceRow extends HTMLElement { diff --git a/src/panels/lovelace/special-rows/hui-button-row.ts b/src/panels/lovelace/special-rows/hui-button-row.ts index 58fa793b62ba..b605ab60868c 100644 --- a/src/panels/lovelace/special-rows/hui-button-row.ts +++ b/src/panels/lovelace/special-rows/hui-button-row.ts @@ -21,7 +21,7 @@ import { handleAction } from "../common/handle-action"; @customElement("hui-button-row") export class HuiButtonRow extends LitElement implements LovelaceRow { public hass?: HomeAssistant; - @property() private _config?: ButtonRowConfig; + @property() protected _config?: ButtonRowConfig; public setConfig(config: ButtonRowConfig): void { if (!config) { diff --git a/src/panels/lovelace/special-rows/hui-call-service-row.ts b/src/panels/lovelace/special-rows/hui-call-service-row.ts index eece0a6ddbf7..cdae3fb3a7a2 100644 --- a/src/panels/lovelace/special-rows/hui-call-service-row.ts +++ b/src/panels/lovelace/special-rows/hui-call-service-row.ts @@ -1,66 +1,34 @@ -import { - html, - LitElement, - TemplateResult, - customElement, - property, -} from "lit-element"; -import "@material/mwc-button"; +import { customElement } from "lit-element"; -import "../../../components/ha-icon"; -import "./hui-button-row"; - -import { - LovelaceRow, - CallServiceRowConfig, - ButtonRowConfig, -} from "../entity-rows/types"; -import { HomeAssistant } from "../../../types"; -import { createRowElement } from "../create-element/create-row-element"; +import { ButtonRowConfig } from "../entity-rows/types"; +import { HuiButtonRow } from "./hui-button-row"; @customElement("hui-call-service-row") -export class HuiCallServiceRow extends LitElement implements LovelaceRow { - public hass?: HomeAssistant; - @property() private _config?: CallServiceRowConfig; +export class HuiCallServiceRow extends HuiButtonRow { + public setConfig(config: ButtonRowConfig): void { + const callServiceConfig: any = config; - public setConfig(config: CallServiceRowConfig): void { - if (!config) { + if (!callServiceConfig) { throw new Error("Error in card configuration."); } - if (!config.name) { + if (!callServiceConfig.name) { throw new Error("Error in card configuration. No name specified."); } - if (!config.service) { + if (!callServiceConfig.service) { throw new Error("Error in card configuration. No service specified."); } - this._config = config; - } - - protected render(): TemplateResult { - if (!this._config || !this.hass) { - return html``; - } - - const config: ButtonRowConfig = { + this._config = { tap_action: { action: "call-service", - service: this._config.service, - service_data: this._config.service_data, + service: callServiceConfig.service, + service_data: callServiceConfig.service_data, }, - ...this._config, + ...callServiceConfig, type: "button", }; - - const element = createRowElement(config); - - element.hass = this.hass; - - return html` - ${element} - `; } } From 4dab3d1c4d8fa641fcc954471c57f83653525886 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Tue, 31 Mar 2020 22:20:00 -0500 Subject: [PATCH 07/10] super --- src/panels/lovelace/special-rows/hui-button-row.ts | 2 +- src/panels/lovelace/special-rows/hui-call-service-row.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/panels/lovelace/special-rows/hui-button-row.ts b/src/panels/lovelace/special-rows/hui-button-row.ts index b605ab60868c..58fa793b62ba 100644 --- a/src/panels/lovelace/special-rows/hui-button-row.ts +++ b/src/panels/lovelace/special-rows/hui-button-row.ts @@ -21,7 +21,7 @@ import { handleAction } from "../common/handle-action"; @customElement("hui-button-row") export class HuiButtonRow extends LitElement implements LovelaceRow { public hass?: HomeAssistant; - @property() protected _config?: ButtonRowConfig; + @property() private _config?: ButtonRowConfig; public setConfig(config: ButtonRowConfig): void { if (!config) { diff --git a/src/panels/lovelace/special-rows/hui-call-service-row.ts b/src/panels/lovelace/special-rows/hui-call-service-row.ts index cdae3fb3a7a2..c2e883c11221 100644 --- a/src/panels/lovelace/special-rows/hui-call-service-row.ts +++ b/src/panels/lovelace/special-rows/hui-call-service-row.ts @@ -20,7 +20,7 @@ export class HuiCallServiceRow extends HuiButtonRow { throw new Error("Error in card configuration. No service specified."); } - this._config = { + super.setConfig({ tap_action: { action: "call-service", service: callServiceConfig.service, @@ -28,7 +28,7 @@ export class HuiCallServiceRow extends HuiButtonRow { }, ...callServiceConfig, type: "button", - }; + }); } } From c783275a7e0984ce813d3f7f2d892224259b01d1 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Wed, 1 Apr 2020 17:35:44 +0200 Subject: [PATCH 08/10] Add CallServiceConfig back in --- src/panels/lovelace/entity-rows/types.ts | 7 +++++++ src/panels/lovelace/special-rows/hui-call-service-row.ts | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/panels/lovelace/entity-rows/types.ts b/src/panels/lovelace/entity-rows/types.ts index 4cf2995623ed..f08283857a09 100644 --- a/src/panels/lovelace/entity-rows/types.ts +++ b/src/panels/lovelace/entity-rows/types.ts @@ -29,6 +29,12 @@ export interface WeblinkConfig { icon?: string; url: string; } +export interface CallServiceConfig extends EntityConfig { + type: "call-service"; + service: string; + service_data?: { [key: string]: any }; + action_name?: string; +} export interface ButtonRowConfig extends EntityConfig { type: "button"; action_name?: string; @@ -57,6 +63,7 @@ export type LovelaceRowConfig = | ButtonsRowConfig | ConditionalRowConfig | ButtonRowConfig + | CallServiceConfig | CastConfig; export interface LovelaceRow extends HTMLElement { diff --git a/src/panels/lovelace/special-rows/hui-call-service-row.ts b/src/panels/lovelace/special-rows/hui-call-service-row.ts index c2e883c11221..7f9fab605182 100644 --- a/src/panels/lovelace/special-rows/hui-call-service-row.ts +++ b/src/panels/lovelace/special-rows/hui-call-service-row.ts @@ -1,12 +1,12 @@ import { customElement } from "lit-element"; -import { ButtonRowConfig } from "../entity-rows/types"; +import { CallServiceConfig } from "../entity-rows/types"; import { HuiButtonRow } from "./hui-button-row"; @customElement("hui-call-service-row") export class HuiCallServiceRow extends HuiButtonRow { - public setConfig(config: ButtonRowConfig): void { - const callServiceConfig: any = config; + public setConfig(config: any): void { + const callServiceConfig: CallServiceConfig = config; if (!callServiceConfig) { throw new Error("Error in card configuration."); From 3a8a845e881ae8b0e36f520e27227894f57a8222 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Wed, 1 Apr 2020 11:29:26 -0500 Subject: [PATCH 09/10] Update types.ts --- src/panels/lovelace/entity-rows/types.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/panels/lovelace/entity-rows/types.ts b/src/panels/lovelace/entity-rows/types.ts index 8559a9fb6bbf..3c6f2ca5cbe2 100644 --- a/src/panels/lovelace/entity-rows/types.ts +++ b/src/panels/lovelace/entity-rows/types.ts @@ -60,6 +60,7 @@ export type LovelaceRowConfig = | DividerConfig | SectionConfig | WeblinkConfig + | ButtonRowConfig | ButtonsRowConfig | ConditionalRowConfig | CallServiceConfig From 43cfd9e791a9ab128f84c71f43a4af2a49fb288c Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Wed, 1 Apr 2020 11:30:10 -0500 Subject: [PATCH 10/10] Update types.ts --- src/panels/lovelace/entity-rows/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panels/lovelace/entity-rows/types.ts b/src/panels/lovelace/entity-rows/types.ts index 3c6f2ca5cbe2..618db5274700 100644 --- a/src/panels/lovelace/entity-rows/types.ts +++ b/src/panels/lovelace/entity-rows/types.ts @@ -60,11 +60,11 @@ export type LovelaceRowConfig = | DividerConfig | SectionConfig | WeblinkConfig + | CallServiceConfig + | CastConfig | ButtonRowConfig | ButtonsRowConfig | ConditionalRowConfig - | CallServiceConfig - | CastConfig | AttributeRowConfig; export interface LovelaceRow extends HTMLElement {