UNPKG

@shadman-a/homebridge-my-ac

Version:

A Homebridge plugin for controlling/monitoring LG ThinQ devices via LG ThinQ platform.

149 lines (148 loc) 5.53 kB
/** * Special thank to carlosgamezvillegas (https://github.com/carlosgamezvillegas) for the initial work on the Oven device. */ import { AccessoryContext, BaseDevice } from '../baseDevice.js'; import { LGThinQHomebridgePlatform } from '../platform.js'; import { Logger, PlatformAccessory, Service } from 'homebridge'; import { DeviceModel } from '../lib/DeviceModel.js'; import { Device } from '../lib/Device.js'; export default class Oven extends BaseDevice { readonly platform: LGThinQHomebridgePlatform; readonly accessory: PlatformAccessory<AccessoryContext>; protected inputNameStatus: string; protected inputNameMode: string; protected probeName: string; protected inputNameTempString: string; protected courseStartString: string; protected courseTimeString: string; protected courseTimerString: string; protected courseTimeEndString: string; protected inputNameOptions: string; protected inputNameBurner1: string; protected inputNameBurner2: string; protected inputNameBurner3: string; protected inputNameBurner4: string; protected inputNameBurner5: string; protected firstStart: boolean; protected firstDuration: number; protected firstTimer: number; protected courseStartMS: number; protected inputID: number; protected temperatureFCommand: number; protected thermostatSel: number; protected timerAlarmSec: number; protected pauseUpdate: boolean; protected firstPause: boolean; protected localTemperature: number; protected localHumidity: number; protected ovenCommandList: { ovenMode: string; ovenSetTemperature: number; tempUnits: string; ovenSetDuration: number; probeTemperature: number; ovenKeepWarm: string; }; protected monitorOnly: boolean; protected homekitMonitorOnly: boolean; protected waitingForCommand: boolean; protected showProbe: boolean; protected showTime: boolean; protected showTimer: boolean; protected showBurner1: boolean; protected showBurner2: boolean; protected showBurner3: boolean; protected showBurner4: boolean; protected showBurner5: boolean; /** service */ protected ovenService: Service; protected ovenState: Service; protected ovenMode: Service; protected ovenTemp: Service; protected prove: Service; protected ovenOptions: Service; protected ovenStart: Service; protected ovenTimer: Service; protected ovenTime: Service; protected ovenEndTime: Service; protected burner1: Service; protected burner2: Service; protected burner3: Service; protected burner4: Service; protected burner5: Service; protected ovenTimerService: Service; protected ovenAlarmService: Service; protected bakeSwitch: Service; protected convectionBakeSwitch: Service; protected convectionRoastSwitch: Service; protected frozenMealSwitch: Service; protected airFrySwitch: Service; protected airSousvideSwitch: Service; protected warmModeSwitch: Service; protected cancelSwitch: Service; protected monitorOnlySwitch: Service; protected startOvenSwitch: Service; protected keepWarmSwitch: Service | undefined; protected ovenDoorOpened: Service; protected rangeOn: Service; protected remoteEnabled: Service; protected burnersOnNumber: Service; protected ovenTempControl: Service; protected probeTempControl: Service; createInputSourceService(name: string, subtype: string, identifier: number, configuredName: string, isShow: boolean): Service; constructor(platform: LGThinQHomebridgePlatform, accessory: PlatformAccessory<AccessoryContext>, logger: Logger); get Status(): OvenStatus; get config(): { oven_trigger: boolean; } & Record<string, any>; secondsToTime(seconds: number): string; sendTimerCommand(time: number): Promise<void>; sendOvenCommand(): Promise<void>; stopOven(): Promise<void>; getMonitorState(): boolean; setActive(): void; ovenOnStatus(): boolean; onStatus(): boolean; nameLengthCheck(newName: string): string; remainTime(): number; ovenModeName(): string; ovenStatus(): string; ovenTemperature(): string; ovenCurrentTemperature(): number; ovenTargetTemperature(): number; probeCurrentTemperature(): number; probeTargetTemperature(): number; OvenSubCookMenu(name: string): string; oventTargetTime(): number; ovenTimerTime(): number; tempCtoF(temp: number): number; tempFtoC(temp: number): number; ovenCookingDuration(): string; ovenCookingTimer(): string; ovenCookingStartTime(): string; ovenCookingEndTime(): string; oventOptions(): string; proveStatus(): string; probeCurrentState(): 0 | 1; probeTargetState(): 0 | 1; currentHeatingState(): 0 | 1; targetHeatingState(): 0 | 1; createCook(key: string): void; burner1State(): string; burner2State(): string; burner3State(): string; burner4State(): string; burner5State(): string; updateOvenModeSwitch(): void; updateOvenModeSwitchNoPause(): void; getOperationTime(timeInSeconds: number): string; ovenServiceActive(): 0 | 1; updateAccessoryCharacteristic(device: Device): void; update(snapshot: any): void; } export declare class OvenStatus { data: any; protected deviceModel: DeviceModel; constructor(data: any, deviceModel: DeviceModel); getState(key: string): any; }