import { IntentTimeseriesService } from '../../intents/services/intent-timeseries.service'; import { LightingMode, LightingRole } from '../spaces.constants'; import { IntentSpecLoaderService } from '../spec'; import { SpaceLightingRoleService } from './space-lighting-role.service'; import { SpacesService } from './spaces.service'; export interface RoleLastIntent { brightness: number | null; } export interface RoleAggregatedState { role: LightingRole; isOn: boolean; isOnMixed: boolean; brightness: number | null; colorTemperature: number | null; color: string | null; white: number | null; isBrightnessMixed: boolean; isColorTemperatureMixed: boolean; isColorMixed: boolean; isWhiteMixed: boolean; lastIntent: RoleLastIntent | null; devicesCount: number; devicesOn: number; } export interface OtherLightsState { isOn: boolean; isOnMixed: boolean; brightness: number | null; colorTemperature: number | null; color: string | null; white: number | null; isBrightnessMixed: boolean; isColorTemperatureMixed: boolean; isColorMixed: boolean; isWhiteMixed: boolean; devicesCount: number; devicesOn: number; } export interface ModeMatch { mode: LightingMode; confidence: 'exact' | 'approximate'; matchPercentage: number; } export interface SpaceLightingState { hasLights: boolean; detectedMode: LightingMode | null; modeConfidence: 'exact' | 'approximate' | 'none'; modeMatchPercentage: number | null; isModeFromIntent: boolean; lastAppliedMode: LightingMode | null; lastAppliedAt: Date | null; totalLights: number; lightsOn: number; averageBrightness: number | null; roles: Partial>; lightsByRole: Record; other: OtherLightsState; } export declare class SpaceLightingStateService { private readonly spacesService; private readonly lightingRoleService; private readonly intentTimeseriesService; private readonly intentSpecLoaderService; private readonly logger; constructor(spacesService: SpacesService, lightingRoleService: SpaceLightingRoleService, intentTimeseriesService: IntentTimeseriesService, intentSpecLoaderService: IntentSpecLoaderService); getLightingState(spaceId: string, options?: { synchronizeModeValidity?: boolean; }): Promise; private getLightStates; private extractLightState; private aggregateByRole; private aggregateLightGroup; private aggregateOther; private getUniformValue; private getUniformColor; private deriveLastIntent; private calculateSummary; private detectMode; private detectMvpMode; private matchMode; private getCombinedOtherState; private shouldUseFallback; private getEffectiveRule; private matchRoleRule; private buildEmptyState; private getPropertyBooleanValue; private getPropertyNumericValue; }