/** * State Manager * * Handles accessory state updates, state retrieval, command triggering, * and state change notifications. */ import type { EventEmitter } from 'node:events'; import type { InternalMatterAccessory } from '../types.js'; export declare class StateManager { private readonly accessories; private readonly emitter; private readonly getMonitoringEnabled; /** * The last command started on each endpoint. Each command runs in its own * transaction, and the UI sends some in pairs without waiting - a dimmable * light's tile sends the level, then "on". The second then reached the onOff * state while the first still held it, and failed with "Cannot lock ... * synchronously" (#4029). So commands for one endpoint run one at a time. */ private readonly commandQueues; constructor(accessories: Map, emitter: EventEmitter, getMonitoringEnabled: () => boolean); /** * Update the state of a Matter accessory (Plugin API) */ updateAccessoryState(uuid: string, cluster: string, attributes: Record, partId?: string): Promise; /** * Apply an ElectricalEnergyMeasurement update. Non-null energy readings are * routed through the matter.js setMeasurement() helper, which updates the * attributes and also emits the CumulativeEnergyMeasured / * PeriodicEnergyMeasured events the spec requires. Everything else (accuracy, * null clears) goes through a plain state set. */ private applyEnergyMeasurementUpdate; /** * Get a Matter accessory's current state */ getAccessoryState(uuid: string, cluster: string, partId?: string): Record | undefined; /** * Trigger a command on a Matter accessory */ triggerCommand(uuid: string, cluster: string, command: string, args?: Record, partId?: string): Promise; /** * Notify that an accessory's state has changed */ notifyStateChange(uuid: string, cluster: string, state: Record, partId?: string): void; } //# sourceMappingURL=StateManager.d.ts.map