registry: ThermostatController 3.2 and ThermostatController.Schedule
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>
This commit is contained in:
parent
af1489696d
commit
f555a5df70
67 changed files with 2445 additions and 58 deletions
71
dist/esm/registry/interfaces/ThermostatController.d.ts
vendored
Normal file
71
dist/esm/registry/interfaces/ThermostatController.d.ts
vendored
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
import type { Schema } from "../schema.js";
|
||||
/** alexa-property-schemas.html, "ThermostatMode values". EM_HEAT, emergency heating, came with version 3.2. */
|
||||
export declare const THERMOSTAT_MODES: readonly ["AUTO", "COOL", "ECO", "EM_HEAT", "HEAT", "OFF"];
|
||||
export type ThermostatModeName = (typeof THERMOSTAT_MODES)[number];
|
||||
/**
|
||||
* Version 3.2. A thermostat declares the properties it has: targetSetpoint for a single setpoint, lowerSetpoint and
|
||||
* upperSetpoint for two, all three for a target within a range. Temperatures are reported "in the same temperature
|
||||
* scale (Celsius or Fahrenheit) that the thermostat is set to display". An error of errorTypes goes under the
|
||||
* namespace of the interface, TEMPERATURE_VALUE_OUT_OF_RANGE under Alexa
|
||||
* (alexa-thermostatcontroller-errorresponse.html).
|
||||
*/
|
||||
export declare const ThermostatController: import("../types.js").InterfaceDescriptor<{
|
||||
targetSetpoint: {
|
||||
name: string;
|
||||
value: Schema<import("../schema.js").Temperature>;
|
||||
};
|
||||
lowerSetpoint: {
|
||||
name: string;
|
||||
value: Schema<import("../schema.js").Temperature>;
|
||||
};
|
||||
upperSetpoint: {
|
||||
name: string;
|
||||
value: Schema<import("../schema.js").Temperature>;
|
||||
};
|
||||
thermostatMode: {
|
||||
name: string;
|
||||
value: import("../schema.js").EnumSchema<"ECO" | "OFF" | "AUTO" | "COOL" | "EM_HEAT" | "HEAT">;
|
||||
};
|
||||
adaptiveRecoveryStatus: {
|
||||
name: string;
|
||||
value: import("../schema.js").EnumSchema<"PREHEATING" | "PRECOOLING" | "INACTIVE">;
|
||||
note: string;
|
||||
};
|
||||
}, {
|
||||
SetTargetTemperature: {
|
||||
name: string;
|
||||
payload: Schema<import("../schema.js").InferShape<{
|
||||
targetSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
||||
lowerSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
||||
upperSetpoint: import("../schema.js").OptionalSchema<import("../schema.js").Temperature>;
|
||||
holdUntil: import("../schema.js").OptionalSchema<import("../schema.js").TimeInterval>;
|
||||
}>>;
|
||||
note: string;
|
||||
};
|
||||
AdjustTargetTemperature: {
|
||||
name: string;
|
||||
payload: Schema<import("../schema.js").InferShape<{
|
||||
targetSetpointDelta: Schema<import("../schema.js").Temperature>;
|
||||
}>>;
|
||||
};
|
||||
SetThermostatMode: {
|
||||
name: string;
|
||||
payload: Schema<import("../schema.js").InferShape<{
|
||||
thermostatMode: Schema<import("../schema.js").InferShape<{
|
||||
value: import("../schema.js").EnumSchema<"ECO" | "OFF" | "AUTO" | "COOL" | "EM_HEAT" | "HEAT">;
|
||||
}>>;
|
||||
}>>;
|
||||
};
|
||||
ResumeSchedule: {
|
||||
name: string;
|
||||
payload: Schema<import("../schema.js").InferShape<{}>>;
|
||||
note: string;
|
||||
};
|
||||
}, import("../schema.js").InferShape<{
|
||||
/** Default: HEAT, COOL, AUTO, OFF. */
|
||||
supportedModes: import("../schema.js").OptionalSchema<("ECO" | "OFF" | "AUTO" | "COOL" | "EM_HEAT" | "HEAT")[]>;
|
||||
/** The user can set a temperature for a time: SetTargetTemperature comes with holdUntil. Default: false. */
|
||||
supportsScheduling: import("../schema.js").OptionalSchema<boolean>;
|
||||
/** The properties the thermostat has. Default: the three setpoints and thermostatMode. */
|
||||
properties: import("../schema.js").OptionalSchema<("targetSetpoint" | "lowerSetpoint" | "upperSetpoint" | "thermostatMode" | "adaptiveRecoveryStatus")[]>;
|
||||
}>, false>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue