import {Connection, HassConfig, HassEntities, HassServices, MessageBase} from "home-assistant-js-websocket"; export interface HomeAssistant { connection: Connection; connected: boolean; states: HassEntities; services: HassServices; config: HassConfig; callService: ( domain: string, service: string, serviceData?: { [key: string]: any } ) => Promise; callApi: ( method: "GET" | "POST" | "PUT" | "DELETE", path: string, parameters?: { [key: string]: any } ) => Promise; fetchWithAuth: ( path: string, init?: { [key: string]: any } ) => Promise; sendWS: (msg: MessageBase) => void; callWS: (msg: MessageBase) => Promise; }