UNPKG

@ronniepettersson/homebridge-dummy

Version:

Create Homebridge accessories to help with automation and control — scheduling, delays, sensors, commands, webhooks, and more

31 lines 1.08 kB
import { PositionAccessory } from './position.js'; import { AccessoryType, WebhookCommand } from '../../model/enums.js'; export class GarageDoorAccessory extends PositionAccessory { constructor(Service, Characteristic, accessory, config, log, isGrouped) { super(Service, Characteristic, accessory, config, log, isGrouped); this.accessoryService.getCharacteristic(Characteristic.ObstructionDetected) .onGet(async () => false); } getAccessoryType() { return AccessoryType.GarageDoorOpener; } get hasPositionState() { return false; } get positionClosed() { return this.Characteristic.TargetDoorState.CLOSED; } get positionOpen() { return this.Characteristic.TargetDoorState.OPEN; } get targetCharacteristic() { return this.Characteristic.TargetDoorState; } get currentCharacteristic() { return this.Characteristic.CurrentDoorState; } get webhookCommand() { return WebhookCommand.TargetDoorState; } } //# sourceMappingURL=garage.js.map