homebridge-homeconnect
Version:
A Homebridge plugin that connects Home Connect appliances to Apple HomeKit
80 lines • 4.54 kB
TypeScript
import { Characteristic, Service } from 'homebridge';
import { ApplianceBase } from './appliance-generic.js';
import { Constructor } from './utils.js';
import { ProgramKey } from './api-value-types.js';
import { OptionDefinitionNumber, OptionDefinitionString } from './api-types.js';
export declare enum ThermostatState {
Off = 0,
Heat = 1,
Cool = 2,
Auto = 3
}
export interface UpdateFanACHCValue {
active?: number;
fanAuto?: number;
fanPercent?: number;
state?: number;
temperature?: number;
}
export interface ACProgramDetails {
key: ProgramKey;
thermostatState: ThermostatState;
fanAuto?: OptionDefinitionString;
fanManual?: OptionDefinitionNumber;
temperature?: OptionDefinitionNumber;
}
export declare function HasFanAC<TBase extends Constructor<ApplianceBase>>(Base: TBase): {
new (...args: any[]): {
readonly activeService: Service;
thermostatService?: Service;
acPrograms: ACProgramDetails[];
initHasFanAC(): Promise<void>;
addFan(updateHC: (value?: UpdateFanACHCValue) => Promise<void>): void;
addThermostat(updateHC: (value?: UpdateFanACHCValue) => Promise<void>): Service;
updateACHC({ active, fanAuto, fanPercent, state, temperature }: UpdateFanACHCValue): Promise<void>;
setAC(active: boolean, auto: boolean, percent: number, state?: ThermostatState, temperature?: number): Promise<void>;
readonly Service: typeof Service;
readonly Characteristic: typeof Characteristic;
readonly config: import("./config-types.js").ApplianceConfig;
readonly schema: import("./homebridge-ui/schema-data.js").ConfigSchemaData;
readonly optionalFeatures: import("./homebridge-ui/schema-data.js").SchemaOptionalFeature[];
readonly cache: import("./persist-cache.js").PersistCache;
readonly cachedOperation: Record<string, string>;
readonly cachedPromise: Map<string, Promise<unknown>>;
readonly asyncInitTasks: {
name: string;
promise: Promise<void>;
}[];
serviceNames: import("./service-name.js").ServiceNames;
readonly accessoryInformationService: Service;
readonly obsoleteServices: Service[];
disconnectedHapStatusError: boolean;
readonly log: import("homebridge").Logger;
readonly platform: import("./platform.js").HomeConnectPlatform;
readonly device: import("./homeconnect-device.js").HomeConnectDevice;
readonly accessory: import("homebridge").PlatformAccessory;
asyncInitialise(name: string, promise: Promise<void>): void;
waitAsyncInitialisation(): Promise<void>;
makeService(serviceConstructor: typeof Service & {
new (displayName?: string, subtype?: string): Service;
UUID: string;
}, suffix?: string, subtype?: string): Service;
cleanupServices(): void;
cleanupOldVersions(): void;
unregister(): void;
identify(): Promise<void>;
hasOptionalFeature(service: string, name: string, group?: string, enableByDefault?: boolean): boolean;
setOptionalFeatures(): Promise<void>;
getCached<Type>(key: string, operation: () => Promise<Type>): Promise<Type>;
doCachedOperation<Type>(key: string, operation: () => Promise<Type>): Promise<Type>;
makeSerialised<Value extends import("./serialised.js").SerialisedValue, Returns = void>(operation: import("./serialised.js").SerialisedOperation<Value, Returns>, defaultValue?: Value): (value?: Value) => Promise<Returns>;
makeSerialisedObject<Value extends object, Returns = void>(operation: import("./serialised.js").SerialisedOperation<Value, Returns>): (value?: Value) => Promise<Returns>;
registerDisconnectedOnGet(): void;
onGet(characteristic: Characteristic): import("homebridge").Nullable<import("homebridge").CharacteristicValue>;
onSet<Type>(assertIsType: (value: unknown) => asserts value is Type, characteristic: Characteristic, handler: import("./appliance-generic.js").OnSetHandler<Type>): Characteristic;
onSetBoolean(args_0: Characteristic, args_1: import("./appliance-generic.js").OnSetHandler<boolean>): Characteristic;
onSetNumber(args_0: Characteristic, args_1: import("./appliance-generic.js").OnSetHandler<number>): Characteristic;
onSetString(args_0: Characteristic, args_1: import("./appliance-generic.js").OnSetHandler<string>): Characteristic;
};
} & TBase;
//# sourceMappingURL=has-fan-ac.d.ts.map