mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +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;
|
webhook_id: string;
|
||||||
cloudhook_id: string;
|
cloudhook_id: string;
|
||||||
cloudhook_url: string;
|
cloudhook_url: string;
|
||||||
|
managed?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const createCloudhook = (hass: HomeAssistant, webhookId: string) =>
|
export const createCloudhook = (hass: HomeAssistant, webhookId: string) =>
|
||||||
|
@ -121,9 +121,9 @@ export class CloudWebhooks extends LitElement {
|
|||||||
`
|
`
|
||||||
: this._cloudHooks![entry.webhook_id]
|
: this._cloudHooks![entry.webhook_id]
|
||||||
? html`
|
? html`
|
||||||
<mwc-button @click="${this._handleManageButton}"
|
<mwc-button @click="${this._handleManageButton}">
|
||||||
>Manage</mwc-button
|
Manage
|
||||||
>
|
</mwc-button>
|
||||||
`
|
`
|
||||||
: html`
|
: html`
|
||||||
<paper-toggle-button
|
<paper-toggle-button
|
||||||
@ -195,8 +195,7 @@ export class CloudWebhooks extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async _fetchData() {
|
private async _fetchData() {
|
||||||
this._localHooks =
|
this._localHooks = this.hass!.config.components.includes("webhook")
|
||||||
"webhook" in this.hass!.config.components
|
|
||||||
? await fetchWebhooks(this.hass!)
|
? await fetchWebhooks(this.hass!)
|
||||||
: [];
|
: [];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user