UNPKG

homebridge-roborock-control

Version:

A Homebridge plugin to control Roborock vacuum cleaners.

38 lines (37 loc) 1.48 kB
import { PlatformAccessory } from 'homebridge'; import { RoborockControllerPlatform } from '../platform'; import { RoborockDeviceClient } from '../roborock/roborock-api.js'; import { PollingAccessory } from './pollingAccessory.js'; declare const kVacuumState = "state"; declare const kFanPower = "fan_power"; declare const kBatteryLevel = "battery"; declare const kCleaning = "is_cleaning"; declare const kLowBattery = "is_low_battery"; declare const kCharging = "is_charging"; interface DeviceState { [kVacuumState]: number; [kFanPower]: number; [kBatteryLevel]: number; [kCleaning]: boolean; [kLowBattery]: boolean; [kCharging]: boolean; } /** * An instance of this class is created for each Roborock accessory. */ export declare class RoborockAccessory extends PollingAccessory<DeviceState> { protected readonly platform: RoborockControllerPlatform; protected readonly accessory: PlatformAccessory; protected readonly rrClient: RoborockDeviceClient; private static kLowBatteryPercent; private batteryService; private fanService; constructor(platform: RoborockControllerPlatform, accessory: PlatformAccessory, rrClient: RoborockDeviceClient); private setupHandlers; private getProperty; private setDeviceState; protected servicesReady(): boolean; protected getDeviceState(lastState: DeviceState): Promise<DeviceState>; protected updateHomekitState(currentState: DeviceState): Promise<void>; } export {};