import { ChannelCategory, DataTypeType, PermissionType, PropertyCategory } from '../../../modules/devices/devices.constants'; import { Z2mExpose, Z2mExposeSpecific } from '../interfaces/zigbee2mqtt.interface'; export interface MappedChannel { identifier: string; name: string; category: ChannelCategory; endpoint?: string; properties: MappedProperty[]; parentIdentifier?: string; } export interface MappedProperty { identifier: string; name: string; category: PropertyCategory; channelCategory: ChannelCategory; dataType: DataTypeType; permissions: PermissionType[]; z2mProperty: string; unit?: string; format?: string[] | number[]; min?: number; max?: number; step?: number; staticValue?: string | number | boolean; transformerName?: string; invalid?: string | number | boolean; } export interface ConversionContext { ieeeAddress: string; friendlyName: string; model?: string; manufacturer?: string; allExposes: Z2mExpose[]; mappedProperties: Set; } export interface CanHandleResult { canHandle: boolean; priority: number; } export interface IConverter { readonly type: string; canHandle(expose: Z2mExpose, context?: ConversionContext): CanHandleResult; convert(expose: Z2mExpose, context: ConversionContext): MappedChannel[]; } export interface IDeviceConverter extends IConverter { readonly exposeType: Z2mExposeSpecific['type']; } export interface ISensorConverter extends IConverter { readonly propertyNames: string[]; } export declare const ConverterPriority: { readonly DEVICE: 100; readonly SENSOR: 50; readonly ACTION: 40; readonly ELECTRICAL: 30; readonly GENERIC: 10; };