import type { WebSocket } from 'ws'; export interface HassInstanceImpl { baseUrl: string; token: string; connect(): Promise; disconnect(): Promise; getStates(): Promise; callService(domain: string, service: string, data?: any): Promise; fetchStates(): Promise; fetchState(entityId: string): Promise; subscribeEvents(callback: (event: any) => void, eventType?: string): Promise; unsubscribeEvents(subscriptionId: number): Promise; } export interface HassWebSocketClient { url: string; token: string; socket: WebSocket | null; connect(): Promise; disconnect(): Promise; send(message: any): Promise; subscribe(callback: (data: any) => void): () => void; } export interface HassState { entity_id: string; state: string; attributes: Record; last_changed: string; last_updated: string; context: { id: string; parent_id: string | null; user_id: string | null; }; } export interface HassServiceCall { domain: string; service: string; target?: { entity_id?: string | string[]; device_id?: string | string[]; area_id?: string | string[]; }; service_data?: Record; } export interface HassEvent { event_type: string; data: any; origin: string; time_fired: string; context: { id: string; parent_id: string | null; user_id: string | null; }; } export type MockFunction any> = { (...args: Parameters): ReturnType; mock: { calls: Parameters[]; results: { type: 'return' | 'throw'; value: any }[]; instances: any[]; mockImplementation(fn: T): MockFunction; mockReturnValue(value: ReturnType): MockFunction; mockResolvedValue(value: Awaited>): MockFunction; mockRejectedValue(value: any): MockFunction; mockReset(): void; }; };