mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-22 16:56:35 +00:00
Fix checking cloudhooks exist (#2893)
This commit is contained in:
parent
3e5d372bbe
commit
836844a312
@ -4,6 +4,7 @@ export interface CloudWebhook {
|
||||
webhook_id: string;
|
||||
cloudhook_id: string;
|
||||
cloudhook_url: string;
|
||||
managed?: boolean;
|
||||
}
|
||||
|
||||
export const createCloudhook = (hass: HomeAssistant, webhookId: string) =>
|
||||
|
@ -121,9 +121,9 @@ export class CloudWebhooks extends LitElement {
|
||||
`
|
||||
: this._cloudHooks![entry.webhook_id]
|
||||
? html`
|
||||
<mwc-button @click="${this._handleManageButton}"
|
||||
>Manage</mwc-button
|
||||
>
|
||||
<mwc-button @click="${this._handleManageButton}">
|
||||
Manage
|
||||
</mwc-button>
|
||||
`
|
||||
: html`
|
||||
<paper-toggle-button
|
||||
@ -195,10 +195,9 @@ export class CloudWebhooks extends LitElement {
|
||||
}
|
||||
|
||||
private async _fetchData() {
|
||||
this._localHooks =
|
||||
"webhook" in this.hass!.config.components
|
||||
? await fetchWebhooks(this.hass!)
|
||||
: [];
|
||||
this._localHooks = this.hass!.config.components.includes("webhook")
|
||||
? await fetchWebhooks(this.hass!)
|
||||
: [];
|
||||
}
|
||||
|
||||
private renderStyle() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user