mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 10:16:46 +00:00
Lint
This commit is contained in:
parent
882dc38b12
commit
4118497978
@ -1,5 +1,4 @@
|
||||
import { HomeAssistant } from "../types";
|
||||
import { Webhook } from "./webhook";
|
||||
|
||||
export interface EntityFilter {
|
||||
include_domains: string[];
|
||||
@ -41,12 +40,6 @@ export interface SubscriptionInfo {
|
||||
human_description: string;
|
||||
}
|
||||
|
||||
export interface WebhookDialogParams {
|
||||
webhook: Webhook;
|
||||
cloudhook: CloudWebhook;
|
||||
disableHook: () => void;
|
||||
}
|
||||
|
||||
export interface CloudWebhook {
|
||||
webhook_id: string;
|
||||
cloudhook_id: string;
|
||||
|
@ -12,12 +12,12 @@ import "../../../components/entity/ha-state-icon";
|
||||
|
||||
import { fireEvent } from "../../../common/dom/fire_event";
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { EntityFilter } from "./types";
|
||||
import computeStateName from "../../../common/entity/compute_state_name";
|
||||
import {
|
||||
FilterFunc,
|
||||
generateFilter,
|
||||
} from "../../../common/entity/entity_filter";
|
||||
import { EntityFilter } from "../../../data/cloud";
|
||||
|
||||
export class CloudExposedEntities extends LitElement {
|
||||
public hass?: HomeAssistant;
|
||||
|
@ -17,8 +17,8 @@ import { PaperDialogElement } from "@polymer/paper-dialog/paper-dialog";
|
||||
import { PaperInputElement } from "@polymer/paper-input/paper-input";
|
||||
|
||||
import { HomeAssistant } from "../../../types";
|
||||
import { WebhookDialogParams } from "./types";
|
||||
import { haStyle } from "../../../resources/styles";
|
||||
import { WebhookDialogParams } from "./show-cloud-webhook-manage-dialog";
|
||||
|
||||
const inputLabel = "Public URL – Click to copy to clipboard";
|
||||
|
||||
|
@ -10,23 +10,15 @@ import "@polymer/paper-item/paper-item-body";
|
||||
import "@polymer/paper-spinner/paper-spinner";
|
||||
import "../../../components/ha-card";
|
||||
|
||||
import { fireEvent } from "../../../common/dom/fire_event";
|
||||
|
||||
import { HomeAssistant, WebhookError } from "../../../types";
|
||||
import { WebhookDialogParams, CloudStatusLoggedIn } from "./types";
|
||||
import { Webhook, fetchWebhooks } from "../../../data/webhook";
|
||||
import {
|
||||
createCloudhook,
|
||||
deleteCloudhook,
|
||||
CloudWebhook,
|
||||
CloudStatusLoggedIn,
|
||||
} from "../../../data/cloud";
|
||||
|
||||
declare global {
|
||||
// for fire event
|
||||
interface HASSDomEvents {
|
||||
"manage-cloud-webhook": WebhookDialogParams;
|
||||
}
|
||||
}
|
||||
import { showManageCloudhookDialog } from "./show-cloud-webhook-manage-dialog";
|
||||
|
||||
export class CloudWebhooks extends LitElement {
|
||||
public hass?: HomeAssistant;
|
||||
@ -138,14 +130,13 @@ export class CloudWebhooks extends LitElement {
|
||||
private _showDialog(webhookId: string) {
|
||||
const webhook = this._localHooks!.find(
|
||||
(ent) => ent.webhook_id === webhookId
|
||||
);
|
||||
)!;
|
||||
const cloudhook = this._cloudHooks![webhookId];
|
||||
const params: WebhookDialogParams = {
|
||||
webhook: webhook!,
|
||||
showManageCloudhookDialog(this, {
|
||||
webhook,
|
||||
cloudhook,
|
||||
disableHook: () => this._disableWebhook(webhookId),
|
||||
};
|
||||
fireEvent(this, "manage-cloud-webhook", params);
|
||||
});
|
||||
}
|
||||
|
||||
private _handleManageButton(ev: MouseEvent) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user