UNPKG

@pietrolubini/homebridge-ecoflow

Version:
21 lines (20 loc) 1.17 kB
import { EcoFlowAccessoryBase } from '@ecoflow/accessories/ecoFlowAccessoryBase'; import { ServiceBase } from '@ecoflow/services/serviceBase'; import { Characteristic, CharacteristicValue, WithUUID } from 'homebridge'; export declare abstract class OutletServiceBase extends ServiceBase { private readonly additionalCharacteristics?; private state; constructor(ecoFlowAccessory: EcoFlowAccessoryBase, additionalCharacteristics?: string[] | undefined, serviceSubType?: string); updateState(state: boolean): void; updateOutputConsumption(watt: number): void; updateOutputVoltage(volt: number): void; updateOutputCurrent(ampere: number): void; protected addCharacteristics(): Characteristic[]; protected abstract processOnSetOn(value: boolean, revert: () => void): Promise<void>; protected tryAddCustomCharacteristic(characteristic: WithUUID<{ new (): Characteristic; }>, characteristicType: string): Characteristic | null; protected updateCustomCharacteristic(characteristic: WithUUID<{ new (): Characteristic; }>, name: string, valueFunc: () => CharacteristicValue, characteristicType: string): void; }