import type { IHomeAssistant, Service, HassArea, StateChangedEvent } from '@hass-blocks/hass-ts'; import type { HassEntity, IEventBus, ICallServiceParams, IEntity, IMutableNode, ITriggerable, IBlocksNode, ISerialisable } from '../types/index.ts'; import type { IFullBlocksClient } from '../types/index.ts'; import type { IMQTTConnection } from '@hass-blocks/hass-mqtt'; /** * @public */ export declare class BlocksClient implements IFullBlocksClient { private client; private bus; private mqtt; private areas; private states; private services; private _automations; private stateChangedCallback; constructor(client: IHomeAssistant, bus: IEventBus, mqtt: IMQTTConnection); /** * Load all available states from home assistant. This will reset the state cache - * call this if you need to remove non existant entities from cache */ loadStates(): Promise; getStates(): Map; getState(id: string): string; getState(entity: IEntity<`${string}.${string}`>): string; getServices(): Promise>>; private getEntityInternal; getEntity(id: string): HassEntity; getEntity(entity: IEntity<`${string}.${string}`>): HassEntity; getAreas(): Promise; getAutomations(): (IBlocksNode & ISerialisable)[]; registerTrigger(trigger: Record, callback: (event: unknown) => void | Promise): Promise; callService(params: ICallServiceParams): Promise; registerAutomation(...automation: (IMutableNode & ITriggerable)[]): Promise; private attachStateChangeListenerIfNotAttached; onStateChanged(id: string, callback: (event: StateChangedEvent) => void): Promise; } //# sourceMappingURL=blocks-client.d.ts.map