UNPKG

@ubreu/homebridge-eufy-security

Version:
37 lines 2.08 kB
/// <reference types="node" /> import { PlatformAccessory, Characteristic, CharacteristicValue, Service, WithUUID } from 'homebridge'; import { EufySecurityPlatform } from '../platform'; import { DeviceEvents, PropertyValue, StationEvents } from 'eufy-security-client'; import { EventEmitter } from 'events'; export type CharacteristicType = WithUUID<{ new (): Characteristic; }>; export type ServiceType = WithUUID<typeof Service> | Service; export declare abstract class BaseAccessory extends EventEmitter { protected platform: EufySecurityPlatform; protected accessory: PlatformAccessory; protected device: any; protected servicesInUse: Service[]; protected SN: string; constructor(platform: EufySecurityPlatform, accessory: PlatformAccessory, device: any); private logPropertyKeys; protected handleRawPropertyChange(device: any, type: number, value: string): void; protected handlePropertyChange(device: any, name: string, value: PropertyValue): void; protected registerCharacteristic({ characteristicType, serviceType, getValue, setValue, onValue, onSimpleValue, onMultipleValue, name, serviceSubType, setValueDebounceTime, }: { characteristicType: CharacteristicType; serviceType: ServiceType; serviceSubType?: string; name?: string; getValue?: (data: any, characteristic?: Characteristic, service?: Service) => any; setValue?: (value: any, characteristic?: Characteristic, service?: Service) => any; onValue?: (service: Service, characteristic: Characteristic) => any; onSimpleValue?: any; onMultipleValue?: (keyof DeviceEvents | StationEvents)[]; setValueDebounceTime?: number; }): void; protected getService(serviceType: ServiceType, name?: string, subType?: string): Service; protected pruneUnusedServices(): void; protected handleDummyEventGet(serviceName: string): Promise<CharacteristicValue>; protected handleDummyEventSet(serviceName: string, value: CharacteristicValue): void; } //# sourceMappingURL=BaseAccessory.d.ts.map