@pmouli/isy-matter-server
Version:
Service to expose an ISY device as a Matter Border router
24 lines • 1.02 kB
JavaScript
import { Identify } from '@matter/main/clusters';
import { DimmableLightRequirements } from '@matter/node/devices';
import { Devices } from 'isy-nodejs/ISY';
import { BehaviorRegistry } from '../BehaviorRegistry.js';
import { ISYClusterBehavior } from '../ISYClusterBehavior.js';
export class IdentifyBehavior extends ISYClusterBehavior(DimmableLightRequirements.IdentifyServer, Devices.ZigBee.ExtendedColorLight) {
async initialize() {
await super.initialize();
this.state.identifyType = Identify.IdentifyType.AudibleBeep;
}
async identify() {
return this.device.onOff.identify();
}
async triggerEffect(request) {
switch (request.effectIdentifier) {
case Identify.EffectIdentifier.Blink:
return this.device.onOff.fastOn().then(() => this.device.onOff.fastOff());
default:
return this.device.onOff.identify();
}
}
}
BehaviorRegistry.register(IdentifyBehavior);
//# sourceMappingURL=IdentifyBehavior.js.map