/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { ActionContext } from "#behavior/context/ActionContext.js";
import { ValueSupervisor } from "#behavior/supervision/ValueSupervisor.js";
import { Endpoint } from "#endpoint/Endpoint.js";
import { Observable } from "@matter/general";
import { Val } from "@matter/protocol";
import { Thermostat } from "@matter/types/clusters/thermostat";
declare const ThermostatBehaviorLogicBase: import("../../index.js").ClusterBehavior.Type<import("./ThermostatBehavior.js").ThermostatBehaviorConstructor, import("@matter/types").ClusterType.WithSupportedFeatures<Thermostat, {
    autoMode: true;
    cooling: true;
    heating: true;
    localTemperatureNotExposed: false;
    matterScheduleConfiguration: false;
    occupancy: true;
    presets: true;
    setback: false;
}>, import("@matter/types").ClusterType.Concrete, new () => {}, "thermostat">;
/**
 * This is the default server implementation of {@link ThermostatBehavior}.
 *
 * The Matter specification requires the Thermostat cluster to support features we do not enable by default. You should
 * use {@link ThermostatServer.with} to specialize the class for the features your implementation supports.
 * We implement all features beside the following:
 * * MatterScheduleConfiguration: This feature is provisional.
 * * ScheduleConfiguration: This feature is deprecated and not allowed to be enabled.
 * * Setback: This feature is considered deprecated.
 * * The use of the "setpointHoldExpiryTimestamp" attribute is currently not supported.
 *
 * This implementation mainly provides all validation and base logic required by the Matter specification.
 * It implements some thermostat logic, partially beyond Matter specification definition, notably:
 * * Adjust the setpoints when a preset is activated
 * If this behavior is not desired, you can override the setActivePresetRequest method but should call
 * handleSetActivePresetRequest() to ensure compliance with the specification.
 *
 * The implementation also adds enhanced system mode logic that can be enabled by setting the state field
 * useAutomaticModeManagement to true. When enabled, the thermostat will:
 * * Adjust the thermostat running mode when in Auto system mode and the Setback feature is also supported
 * * Determine the system mode and/or running mode based on temperature changes
 *
 * For local temperature or occupancy values we check if there is a local cluster available on the same endpoint and use
 * them, alternatively raw measurements can be set in the states externalMeasuredIndoorTemperature and
 * externallyMeasuredOccupancy. The OutdoorTemperature can be set directly on the attribute if supported.
 * The RemoteSensing attribute need to be set correctly as needed by the developer to identify the measurement source.
 *
 * The following custom events are provided:
 * * calibratedTemperature$Changed: Emitted when the measured local temperature changes including any calibration applied. This event is mainly useful when the localTemperatureNotExposed feature is used.
 *
 * Important note: To access the current local temperature (including all calibrations applied) please use
 * this.internal.localTemperature because the localTemperature attribute in state might be null depending on the
 * configured features.
 *
 * TODO: Currently the general purpose "atomic write" Matter feature is only implemented in this specific cluster because
 *  only used here so far. Also see information in AtomicWriteHandler.ts.
 */
export declare class ThermostatBaseServer extends ThermostatBehaviorLogicBase {
    #private;
    protected internal: ThermostatBaseServer.Internal;
    readonly state: ThermostatBaseServer.State;
    readonly events: ThermostatBaseServer.Events;
    static readonly schema: import("@matter/model").ClusterModel;
    initialize(): Promise<void>;
    /**
     * The default implementation of the SetpointRaiseLower command. It handles all validation and setpoint adjustments
     * required by the Matter specification. This method only changes the Occupied setpoints.
     */
    setpointRaiseLower({ mode, amount }: Thermostat.SetpointRaiseLowerRequest): void;
    /**
     * Performs basic validation and sets the active preset handle when valid.
     * This fulfills the basic requirements of the SetActivePresetRequest matter command. Use this method if you need
     * to override setActivePresetRequest to ensure compliance.
     */
    protected handleSetActivePresetRequest({ presetHandle }: Thermostat.SetActivePresetRequest): Thermostat.Preset | undefined;
    /**
     * This default implementation of the SetActivePresetRequest command handler sets the active preset and
     * (additionally to specification requirements!) adjusts the setpoints to the preset values if defined.
     *
     * If you do not want this behavior, you can override this method but should call handleSetActivePresetRequest to
     * ensure compliance with the specification.
     */
    setActivePresetRequest({ presetHandle }: Thermostat.SetActivePresetRequest): void;
    /**
     * Whether the thermostat is currently considered occupied
     * Uses the occupancy state if the feature is supported, otherwise always true
     */
    protected get occupied(): boolean;
    /** The current heating setpoint depending on occupancy */
    protected get heatingSetpoint(): number;
    protected set heatingSetpoint(value: number);
    /** The current cooling setpoint depending on occupancy */
    protected get coolingSetpoint(): number;
    protected set coolingSetpoint(value: number);
    /** Whether heating is allowed in the current ControlSequenceOfOperation and features */
    protected get heatingAllowed(): boolean;
    /** Whether cooling is allowed in the current ControlSequenceOfOperation and features */
    protected get coolingAllowed(): boolean;
    /**
     * Adjust the running mode of the thermostat based on the new system mode when the thermostatRunningMode is supported
     */
    protected adjustRunningMode(newState: Thermostat.ThermostatRunningMode): void;
    /**
     * The current mode the thermostat is considered to be in based on local temperature and setpoints
     */
    protected get temperatureConsideration(): "belowTarget" | "onTarget" | "aboveTarget" | undefined;
    get heatSetpointMinimum(): number;
    get heatSetpointMaximum(): number;
    get coolSetpointMinimum(): number;
    get coolSetpointMaximum(): number;
    get setpointDeadBand(): number;
    [Symbol.asyncDispose](): Promise<void>;
    /** Implementation of the atomic request handling */
    atomicRequest(request: Thermostat.AtomicRequest): Promise<Thermostat.AtomicResponse>;
}
export declare namespace ThermostatBaseServer {
    class State extends ThermostatBehaviorLogicBase.State {
        /**
         * Otherwise measured temperature in Matter format as uint16 with a factor of 100. A calibration offset is applied
         * additionally from localTemperatureCalibration if set.
         * Use this if you have an external temperature sensor that should be used for thermostat control instead of a
         * local temperature measurement cluster.
         */
        externalMeasuredIndoorTemperature?: number;
        /**
         * Endpoint (Number or string-Id) where to find the indoor temperature measurement cluster to use as
         * local temperature measurement for the thermostat behavior.
         */
        localIndoorTemperatureMeasurementEndpoint?: number | string;
        /**
         * Otherwise measured occupancy as boolean.
         * Use this if you have an external occupancy sensor that should be used for thermostat control instead of a
         * internal occupancy sensing cluster.
         */
        externallyMeasuredOccupancy?: boolean;
        /**
         * Endpoint (Number or string-Id) where to find the occupancy sensing cluster to use as
         * local occupancy measurement for the thermostat behavior.
         */
        localOccupancyMeasurementEndpoint?: number | string;
        /**
         * Use to enable the automatic mode management, implemented by this standard implementation.  This is beyond
         * Matter specification! It reacts to temperature changes to adjust system running mode automatically. It also
         * requires the Auto feature to be  enabled and the ThermostatRunningMode attribute to be present.
         */
        useAutomaticModeManagement: boolean;
        /**
         * Persisted presets stored in the device, needed because the original "presets" is a virtual property
         */
        persistedPresets?: Thermostat.Preset[];
        /**
         * Implementation of the needed Preset attribute logic for Atomic Write handling.
         */
        [Val.properties](endpoint: Endpoint, session: ValueSupervisor.Session): {};
    }
    class Events extends ThermostatBehaviorLogicBase.Events {
        externalMeasuredIndoorTemperature$Changed: Observable<[value: number, oldValue: number, context: ActionContext], void>;
        externallyMeasuredOccupancy$Changed: Observable<[value: boolean, oldValue: boolean, context: ActionContext], void>;
        persistedPresets$Changed: Observable<[value: Thermostat.Preset[], oldValue: Thermostat.Preset[], context: ActionContext], void>;
        persistedPresets$Changing: Observable<[value: Thermostat.Preset[], oldValue: Thermostat.Preset[], context: ActionContext], void>;
        /**
         * Custom event emitted when the calibrated temperature changes.
         */
        calibratedTemperature$Changed: Observable<[value: number | null, oldValue: number | null, context: ActionContext], void>;
        /**
         * Custom event emitted when the Presets attribute is "virtually" changing as part of an atomic write operation.
         * Info: The events is currently needed to be a pure Observable to get errors thrown in the event handler be
         *  reported back to the emitter.
         */
        presets$AtomicChanging: Observable<[value: Thermostat.Preset[], oldValue: Thermostat.Preset[], context: ActionContext], void>;
        /**
         * Custom event emitted when the Presets attribute has "virtually" changed as part of an atomic write operation.
         * Info: The events is currently needed to be a pure Observable to get errors thrown in the event handler be
         * reported back to the emitter.
         */
        presets$AtomicChanged: Observable<[value: Thermostat.Preset[], oldValue: Thermostat.Preset[], context: ActionContext], void>;
        /**
         * Custom event emitted to inform the behavior implementation of an update of the PersistedPresets attribute.
         */
        updatePresets: Observable<[value: Thermostat.Preset[]], void>;
    }
    class Internal {
        /**
         * Local temperature in Matter format as uint16 with a factor of 100. It is the same value as the one reported
         * in the localTemperature Attribute, but also present when the LocalTemperatureNotExposed feature is enabled.
         * Means all logic and calculations are always done with this value.
         * The value will be updated on initialization and when the localTemperature Attribute changes.
         */
        localTemperature: number | null;
        /**
         * Storing fixed value internally to ensure it can not be modified.
         * This value will be initialized when the behavior is initialized and is static afterward.
         */
        minSetpointDeadBand: number;
        /**
         * Storing fixed value internally to ensure it can not be modified.
         * This value will be initialized when the behavior is initialized and is static afterward.
         */
        controlSequenceOfOperation: Thermostat.ControlSequenceOfOperation;
    }
}
declare const ThermostatServer_base: import("../../index.js").ClusterBehavior.Type<typeof ThermostatBaseServer, Thermostat, typeof Thermostat, typeof ThermostatBaseServer.Internal, "thermostat"> & {
    readonly id: "thermostat";
};
export declare class ThermostatServer extends ThermostatServer_base {
}
export {};
//# sourceMappingURL=ThermostatServer.d.ts.map