UNPKG

@pmouli/isy-matter-server

Version:

Service to expose an ISY device as a Matter Border router

34 lines 1 kB
import 'winston'; import { ZWaveBase } from './ZWaveBase.js'; export class ZwaveLockDevice extends ZWaveBase { constructor(isy, deviceNode) { super(isy, deviceNode); } sendLockCommand(lockState, resultHandler) { this.sendNonSecureLockCommand(lockState); this.sendSecureLockCommand(lockState); } get isLocked() { return this.drivers.ST.value > 0; } async updateIsLocked(isLocked) { //return super.updateState(isLocked); } async sendNonSecureLockCommand(lockState) { if (lockState) { return this.isy.sendNodeCommand(this, 'DON'); } else { return this.isy.sendNodeCommand(this, 'DOF'); } } async sendSecureLockCommand(lockState) { if (lockState) { return this.isy.sendNodeCommand(this, 'DON', 1); } else { return this.isy.sendNodeCommand(this, 'DON', 0); } } } //# sourceMappingURL=ZWaveLockDevice.js.map