UNPKG

@pmouli/isy-matter-server

Version:

Service to expose an ISY device as a Matter Border router

24 lines 991 B
import { DimmableLightRequirements } from '@matter/node/devices'; import { Identify } from '@matter/main/clusters'; import { ISYClusterBehavior } from '../ISYClusterBehavior.js'; import { BehaviorRegistry } from '../BehaviorRegistry.js'; import { Devices } from 'isy-nodejs/ISY'; export class IdentifyBehavior extends ISYClusterBehavior(DimmableLightRequirements.IdentifyServer, Devices.Insteon.RelayLamp) { async initialize() { await super.initialize(); this.state.identifyType = Identify.IdentifyType.AudibleBeep; } async identify() { return this.device.beep(100); } async triggerEffect(request) { switch (request.effectIdentifier) { case Identify.EffectIdentifier.Blink: return this.device.fastOn().then(() => this.device.fastOff()); default: return this.device.beep(100); } } } BehaviorRegistry.register(IdentifyBehavior); //# sourceMappingURL=IdentifyBehavior.js.map