UNPKG

@koush/ring-client-api

Version:

Unofficial API for Ring doorbells, cameras, security alarm system and smart lighting

29 lines (28 loc) 1.19 kB
import { Observable } from 'rxjs'; import { RingPlatformConfig } from './config'; import { Characteristic, Logging, PlatformAccessory, Service, CharacteristicValue, WithUUID } from 'homebridge'; export declare type CharacteristicType = WithUUID<{ new (): Characteristic; }>; export declare type ServiceType = WithUUID<typeof Service> | Service; export declare abstract class BaseAccessory<T extends { name: string; }> { abstract readonly device: T; abstract readonly accessory: PlatformAccessory; abstract readonly logger: Logging; abstract readonly config: RingPlatformConfig; private servicesInUse; initBase(): void; getService(serviceType: ServiceType, name?: string, subType?: string): Service; registerObservableCharacteristic<U extends CharacteristicValue>({ characteristicType, serviceType, serviceSubType, onValue, setValue, name, requestUpdate, }: { characteristicType: CharacteristicType; serviceType: ServiceType; serviceSubType?: string; onValue: Observable<U>; setValue?: (value: U) => any; name?: string; requestUpdate?: () => any; }): void; pruneUnusedServices(): void; }