mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-29 04:06:35 +00:00
Disable "Execute" if automation is unavailable (#6866)
This commit is contained in:
parent
1890aab1e6
commit
e3b18a33ca
@ -34,7 +34,10 @@ class MoreInfoAutomation extends LitElement {
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<mwc-button @click=${this.handleAction}>
|
||||
<mwc-button
|
||||
@click=${this.handleAction}
|
||||
.disabled=${this.stateObj!.state === "unavailable"}
|
||||
>
|
||||
${this.hass.localize("ui.card.automation.trigger")}
|
||||
</mwc-button>
|
||||
</div>
|
||||
|
@ -91,10 +91,11 @@ class HaAutomationPicker extends LitElement {
|
||||
if (!narrow) {
|
||||
columns.execute = {
|
||||
title: "",
|
||||
template: (_info, automation) => html`
|
||||
template: (_info, automation: any) => html`
|
||||
<mwc-button
|
||||
.automation=${automation}
|
||||
@click=${(ev) => this._execute(ev)}
|
||||
.disabled=${automation.state === "unavailable"}
|
||||
>
|
||||
${this.hass.localize("ui.card.automation.trigger")}
|
||||
</mwc-button>
|
||||
|
Loading…
x
Reference in New Issue
Block a user