UNPKG

@pmouli/isy-matter-server

Version:

Service to expose an ISY device as a Matter Border router

49 lines 2.38 kB
/* THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT EDIT DIRECTLY. */ import { UnitOfMeasure } from "../../../Definitions/Global/index.js"; import { Base } from "../index.js"; import { Driver } from "../../../Definitions/Global/Drivers.js"; import { NodeFactory } from "../../NodeFactory.js"; export class IrLincTx extends Base { commands = { BEEP: this.beep, WDU: this.writeChanges }; static nodeDefId = "IRLincTx"; static implements = ['IRLincTx', "SirenAlert", "SirenArm"]; constructor(isy, nodeInfo) { super(isy, nodeInfo); this.drivers.ERR = Driver.create("ERR", this, nodeInfo.state['ERR'], { uom: UnitOfMeasure.Index, label: "Responding", name: "responding" }); } async beep(value) { return this.sendCommand("BEEP", [value, UnitOfMeasure.LevelFrom0To255]); } async writeChanges() { return this.sendCommand("WDU"); } get responding() { return this.drivers.ERR?.value; } } NodeFactory.register(IrLincTx); (function (IrLincTx) { function is(node) { return ['IRLincTx'].includes(node.nodeDefId); } IrLincTx.is = is; function isImplementedBy(node) { return ['IRLincTx', "Thermostat", "TempLinc", "DimmerMotorSwitch", "DimmerMotorSwitch_ADV", "DimmerLampSwitch", "DimmerLampSwitch_ADV", "DimmerLampSwitchLED", "DimmerLampSwitchLED_ADV", "DimmerLampOnly", "KeypadDimmer", "KeypadDimmer_ADV", "BallastRelayLampSwitch", "BallastRelayLampSwitch_ADV", "RelayLampSwitch", "RelayLampSwitch_ADV", "RelayLampSwitchLED", "RelayLampSwitchLED_ADV", "RelaySwitchOnlyPlusQuery", "RelaySwitchOnlyPlusQuery_ADV", "RelaySwitchOnly", "RelaySwitchOnly_ADV", "RelayLampOnly", "RelayLampOnly_ADV", "KeypadRelay", "KeypadRelay_ADV"].includes(node.nodeDefId); } IrLincTx.isImplementedBy = isImplementedBy; function create(isy, nodeInfo) { return new IrLincTx(isy, nodeInfo); } IrLincTx.create = create; IrLincTx.Node = IrLincTx; IrLincTx.Class = IrLincTx; let Commands; (function (Commands) { Commands["beep"] = "BEEP"; Commands["writeChanges"] = "WDU"; })(Commands = IrLincTx.Commands || (IrLincTx.Commands = {})); let Drivers; (function (Drivers) { Drivers["responding"] = "ERR"; })(Drivers = IrLincTx.Drivers || (IrLincTx.Drivers = {})); })(IrLincTx || (IrLincTx = {})); //# sourceMappingURL=IrLincTx.js.map