UNPKG

@pmouli/isy-matter-server

Version:

Service to expose an ISY device as a Matter Border router

20 lines (16 loc) 799 B
import { Identify, SmokeCoAlarm } from '@matter/main/clusters'; import { DimmableLightRequirements } from '@matter/node/devices'; import { SmokeCoAlarmServer } from '@matter/node/behaviors'; import { Devices } from 'isy-nodejs/ISY'; import { BehaviorRegistry } from '../BehaviorRegistry.js'; import { ISYClusterBehavior } from '../ISYClusterBehavior.js'; //@ts-ignore const COAlarmServer = SmokeCoAlarmServer.with(SmokeCoAlarm.Feature.CoAlarm) as typeof SmokeCoAlarmServer; export class COSensorBehavior extends ISYClusterBehavior(COAlarmServer, Devices.Insteon.COSensor) { override async initialize() { await super.initialize(); this.state.expressedState = SmokeCoAlarm.ExpressedState.Normal; //this. = Identify.IdentifyType.AudibleBeep; } } BehaviorRegistry.register(COSensorBehavior);