The thermostat is described from its page: one, two or three setpoints with holdUntil, AdjustTargetTemperature, SetThermostatMode with the six modes (EM_HEAT is new), ResumeSchedule, adaptiveRecoveryStatus, and its seven error types under Alexa.ThermostatController. A declaration gives supportedModes, supportsScheduling and the properties the device has; without them discovery is what 1.5.2 sent: HEAT, COOL, AUTO, OFF and the three setpoints with thermostatMode. supportedModes without HEAT or COOL is refused where it is declared. ThermostatController.Schedule replaces its stub. Wire change for a 1.x declaration of it: version 3.2 (was 1) and scheduleEnabled listed (was nothing). SetAdaptiveRecovery is taken only with supportsAdaptiveRecovery. 24 examples of three pages are saved as fixtures; the page folds the SetWeeklySchedule example away, its payload is tested from the tables. 207 tests pass, 191 before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
142 lines
9.2 KiB
TypeScript
142 lines
9.2 KiB
TypeScript
/**
|
|
* Version 3.2. The schedule a user writes in the Alexa app: the interface has no utterances. Discovery lists
|
|
* adaptiveRecoveryEnabled for a thermostat declared with supportsAdaptiveRecovery, and Alexa sends
|
|
* SetAdaptiveRecovery to such a thermostat only.
|
|
*/
|
|
export declare const ThermostatControllerSchedule: import("../types.js").InterfaceDescriptor<{
|
|
adaptiveRecoveryEnabled: {
|
|
name: string;
|
|
value: import("../schema.js").Schema<boolean>;
|
|
};
|
|
scheduleEnabled: {
|
|
name: string;
|
|
value: import("../schema.js").Schema<boolean>;
|
|
};
|
|
}, {
|
|
SetWeeklySchedule: {
|
|
name: string;
|
|
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
weeklySchedule: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
temperatureScale: import("../schema.js").EnumSchema<"CELSIUS" | "FAHRENHEIT" | "KELVIN">;
|
|
Monday: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
startTimeInMinutes: import("../schema.js").Schema<number>;
|
|
setpoints: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
upperSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
lowerSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
}>>;
|
|
/** Without a mode the fan runs as the manufacturer set it. */
|
|
fanSetting: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
mode: import("../schema.js").OptionalSchema<"ON" | "AUTO" | "CIRCULATE">;
|
|
}>>;
|
|
activityType: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
type: import("../schema.js").EnumSchema<"AWAY" | "HOME" | "SLEEP">;
|
|
}>>;
|
|
}>[]>;
|
|
Tuesday: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
startTimeInMinutes: import("../schema.js").Schema<number>;
|
|
setpoints: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
upperSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
lowerSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
}>>;
|
|
/** Without a mode the fan runs as the manufacturer set it. */
|
|
fanSetting: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
mode: import("../schema.js").OptionalSchema<"ON" | "AUTO" | "CIRCULATE">;
|
|
}>>;
|
|
activityType: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
type: import("../schema.js").EnumSchema<"AWAY" | "HOME" | "SLEEP">;
|
|
}>>;
|
|
}>[]>;
|
|
Wednesday: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
startTimeInMinutes: import("../schema.js").Schema<number>;
|
|
setpoints: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
upperSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
lowerSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
}>>;
|
|
/** Without a mode the fan runs as the manufacturer set it. */
|
|
fanSetting: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
mode: import("../schema.js").OptionalSchema<"ON" | "AUTO" | "CIRCULATE">;
|
|
}>>;
|
|
activityType: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
type: import("../schema.js").EnumSchema<"AWAY" | "HOME" | "SLEEP">;
|
|
}>>;
|
|
}>[]>;
|
|
Thursday: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
startTimeInMinutes: import("../schema.js").Schema<number>;
|
|
setpoints: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
upperSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
lowerSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
}>>;
|
|
/** Without a mode the fan runs as the manufacturer set it. */
|
|
fanSetting: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
mode: import("../schema.js").OptionalSchema<"ON" | "AUTO" | "CIRCULATE">;
|
|
}>>;
|
|
activityType: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
type: import("../schema.js").EnumSchema<"AWAY" | "HOME" | "SLEEP">;
|
|
}>>;
|
|
}>[]>;
|
|
Friday: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
startTimeInMinutes: import("../schema.js").Schema<number>;
|
|
setpoints: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
upperSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
lowerSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
}>>;
|
|
/** Without a mode the fan runs as the manufacturer set it. */
|
|
fanSetting: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
mode: import("../schema.js").OptionalSchema<"ON" | "AUTO" | "CIRCULATE">;
|
|
}>>;
|
|
activityType: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
type: import("../schema.js").EnumSchema<"AWAY" | "HOME" | "SLEEP">;
|
|
}>>;
|
|
}>[]>;
|
|
Saturday: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
startTimeInMinutes: import("../schema.js").Schema<number>;
|
|
setpoints: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
upperSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
lowerSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
}>>;
|
|
/** Without a mode the fan runs as the manufacturer set it. */
|
|
fanSetting: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
mode: import("../schema.js").OptionalSchema<"ON" | "AUTO" | "CIRCULATE">;
|
|
}>>;
|
|
activityType: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
type: import("../schema.js").EnumSchema<"AWAY" | "HOME" | "SLEEP">;
|
|
}>>;
|
|
}>[]>;
|
|
Sunday: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
startTimeInMinutes: import("../schema.js").Schema<number>;
|
|
setpoints: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
upperSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
lowerSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
|
}>>;
|
|
/** Without a mode the fan runs as the manufacturer set it. */
|
|
fanSetting: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
mode: import("../schema.js").OptionalSchema<"ON" | "AUTO" | "CIRCULATE">;
|
|
}>>;
|
|
activityType: import("../schema.js").OptionalSchema<import("../schema.js").InferShape<{
|
|
type: import("../schema.js").EnumSchema<"AWAY" | "HOME" | "SLEEP">;
|
|
}>>;
|
|
}>[]>;
|
|
}>>;
|
|
}>>;
|
|
note: string;
|
|
};
|
|
SetScheduleState: {
|
|
name: string;
|
|
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
scheduleEnabled: import("../schema.js").Schema<boolean>;
|
|
}>>;
|
|
note: string;
|
|
};
|
|
SetAdaptiveRecovery: {
|
|
name: string;
|
|
payload: import("../schema.js").Schema<import("../schema.js").InferShape<{
|
|
adaptiveRecoveryEnabled: import("../schema.js").Schema<boolean>;
|
|
}>>;
|
|
when: ({ options }: import("../types.js").Declared<any>) => boolean;
|
|
};
|
|
}, import("../schema.js").InferShape<{
|
|
supportedFanModes: import("../schema.js").Schema<("ON" | "AUTO" | "CIRCULATE")[]>;
|
|
/** The thermostat heats or cools ahead of an entry, to be at its temperature when it starts. */
|
|
supportsAdaptiveRecovery: import("../schema.js").Schema<boolean>;
|
|
maxEntryPerDay: import("../schema.js").OptionalSchema<number>;
|
|
}>, false>;
|