import { DeviceCategory } from '../../devices/devices.constants'; import { ChannelEntity, ChannelPropertyEntity, DeviceEntity } from '../../devices/entities/devices.entity'; import { IntentTimeseriesService } from '../../intents/services/intent-timeseries.service'; import { ClimateMode, ClimateRole } from '../spaces.constants'; import { SpaceClimateRoleService } from './space-climate-role.service'; import { SpaceIntentBaseService } from './space-intent-base.service'; import { SpacesService } from './spaces.service'; export interface PrimaryClimateDevice { device: DeviceEntity; deviceCategory: DeviceCategory; role: ClimateRole | null; temperatureChannel: ChannelEntity | null; temperatureProperty: ChannelPropertyEntity | null; humidityChannel: ChannelEntity | null; humidityProperty: ChannelPropertyEntity | null; heaterChannel: ChannelEntity | null; heaterOnProperty: ChannelPropertyEntity | null; heaterStatusProperty: ChannelPropertyEntity | null; heaterSetpointProperty: ChannelPropertyEntity | null; heaterMinSetpoint: number; heaterMaxSetpoint: number; coolerChannel: ChannelEntity | null; coolerOnProperty: ChannelPropertyEntity | null; coolerStatusProperty: ChannelPropertyEntity | null; coolerSetpointProperty: ChannelPropertyEntity | null; coolerMinSetpoint: number; coolerMaxSetpoint: number; thermostatChannel: ChannelEntity | null; thermostatLockedProperty: ChannelPropertyEntity | null; fanChannel: ChannelEntity | null; fanOnProperty: ChannelPropertyEntity | null; supportsHeating: boolean; supportsCooling: boolean; } export interface ClimateState { hasClimate: boolean; mode: ClimateMode; currentTemperature: number | null; currentHumidity: number | null; heatingSetpoint: number | null; coolingSetpoint: number | null; minSetpoint: number; maxSetpoint: number; supportsHeating: boolean; supportsCooling: boolean; isHeating: boolean; isCooling: boolean; isMixed: boolean; devicesCount: number; lastAppliedMode: ClimateMode | null; lastAppliedAt: Date | null; } export declare class SpaceClimateStateService extends SpaceIntentBaseService { private readonly spacesService; private readonly climateRoleService; private readonly intentTimeseriesService; private readonly logger; constructor(spacesService: SpacesService, climateRoleService: SpaceClimateRoleService, intentTimeseriesService: IntentTimeseriesService); getClimateState(spaceId: string): Promise; getPrimaryClimateDevicesInSpace(spaceId: string): Promise; private extractPrimaryClimateDevices; detectClimateModeAndActivity(devices: PrimaryClimateDevice[]): { mode: ClimateMode; isHeating: boolean; isCooling: boolean; }; private getConsensusValue; private detectMixedState; private extractSensorTemperatures; private extractPrimaryClimateDevice; private getClimatePropertyMinMax; }