import { ChannelCategory, PropertyCategory } from '../../devices/devices.constants'; import { SensorRole } from '../spaces.constants'; import { SpaceIntentBaseService } from './space-intent-base.service'; import { SpaceSensorRoleService } from './space-sensor-role.service'; import { SpacesService } from './spaces.service'; export interface SensorAdditionalReading { propertyId: string; propertyCategory: PropertyCategory; value: number | boolean | string | null; unit: string | null; updatedAt: Date | string | null; trend: 'rising' | 'falling' | 'stable' | null; } export interface SensorReading { deviceId: string; deviceName: string; channelId: string; channelName: string; channelCategory: ChannelCategory; propertyId: string | null; value: number | boolean | string | null; unit: string | null; role: SensorRole | null; updatedAt: Date | string | null; trend: 'rising' | 'falling' | 'stable' | null; additionalReadings: SensorAdditionalReading[]; } export interface SensorRoleReadings { role: SensorRole; sensorsCount: number; readings: SensorReading[]; } export interface EnvironmentSummary { averageTemperature: number | null; averageHumidity: number | null; averagePressure: number | null; averageIlluminance: number | null; } export interface SafetyAlert { channelCategory: ChannelCategory; deviceId: string; deviceName: string; channelId: string; triggered: boolean; } export interface SensorState { hasSensors: boolean; totalSensors: number; sensorsByRole: Record; environment: EnvironmentSummary | null; safetyAlerts: SafetyAlert[]; hasSafetyAlert: boolean; motionDetected: boolean; occupancyDetected: boolean; readings: SensorRoleReadings[]; } export declare class SpaceSensorStateService extends SpaceIntentBaseService { private readonly spacesService; private readonly sensorRoleService; private readonly logger; constructor(spacesService: SpacesService, sensorRoleService: SpaceSensorRoleService); getSensorState(spaceId: string): Promise; private static readonly EXCLUDED_ADDITIONAL_CATEGORIES; private findPrimaryProperty; private extractChannelValue; private extractAdditionalReadings; private collectEnvironmentData; private checkSafetyAlerts; private groupReadingsByRole; private calculateAverage; private isBooleanTrue; }