homebridge-z2m
Version:
Expose your Zigbee devices to HomeKit with ease, by integrating Zigbee2MQTT with Homebridge.
25 lines • 1.55 kB
TypeScript
import { Characteristic, Service } from 'homebridge';
import { BasicLogger } from '../../logger';
import { ExposesEntryWithBinaryProperty, ExposesEntryWithProperty } from '../../z2mModels';
import { BasicAccessory, ServiceHandler } from '../interfaces';
import { CharacteristicMonitor } from '../monitor';
export type ServiceConstructor = (serviceName: string, subType: string | undefined) => Service;
export type IdentifierGenerator = (endpoint: string | undefined, accessory: BasicAccessory) => string;
export declare abstract class BasicSensorHandler implements ServiceHandler {
protected readonly sensorExpose: ExposesEntryWithProperty;
protected log: BasicLogger;
protected monitors: CharacteristicMonitor[];
protected tamperExpose?: ExposesEntryWithBinaryProperty;
protected lowBatteryExpose?: ExposesEntryWithBinaryProperty;
protected service: Service;
protected serviceName: string;
identifier: string;
constructor(accessory: BasicAccessory, sensorExpose: ExposesEntryWithProperty, otherExposes: ExposesEntryWithBinaryProperty[], identifierGen: IdentifierGenerator, service: ServiceConstructor, additionalSubType?: string | undefined);
abstract mainCharacteristics: (Characteristic | undefined)[];
get getableKeys(): string[];
protected createOptionalGenericCharacteristics(exposes: ExposesEntryWithBinaryProperty[], service: Service): void;
private tryCreateTamper;
private tryCreateLowBattery;
updateState(state: Record<string, unknown>): void;
}
//# sourceMappingURL=basic.d.ts.map