UNPKG

@pmouli/isy-matter-server

Version:

Service to expose an ISY device as a Matter Border router

56 lines 2.94 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 RelaySwitchOnlyPlusQuery extends Base { commands = { QUERY: this.query, BEEP: this.beep, BL: this.backlight, WDU: this.writeChanges }; static nodeDefId = "RelaySwitchOnlyPlusQuery"; static implements = ['RelaySwitchOnlyPlusQuery', "RelaySwitchOnly", "RelaySwitchOnly_ADV", "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 query() { return this.sendCommand("QUERY"); } async beep(value) { return this.sendCommand("BEEP", [value, UnitOfMeasure.LevelFrom0To255]); } async backlight(value) { return this.sendCommand("BL", [value, UnitOfMeasure.Percent]); } async writeChanges() { return this.sendCommand("WDU"); } get responding() { return this.drivers.ERR?.value; } } NodeFactory.register(RelaySwitchOnlyPlusQuery); NodeFactory.register(RelaySwitchOnlyPlusQuery, "RelaySwitchOnlyPlusQuery_ADV"); (function (RelaySwitchOnlyPlusQuery) { function is(node) { return ['RelaySwitchOnlyPlusQuery', "RelaySwitchOnlyPlusQuery_ADV"].includes(node.nodeDefId); } RelaySwitchOnlyPlusQuery.is = is; function isImplementedBy(node) { return ['RelaySwitchOnlyPlusQuery', "DimmerMotorSwitch", "DimmerMotorSwitch_ADV", "DimmerLampSwitch", "DimmerLampSwitch_ADV", "DimmerLampSwitchLED", "DimmerLampSwitchLED_ADV", "KeypadDimmer", "KeypadDimmer_ADV", "RelayLampSwitch", "RelayLampSwitch_ADV", "RelayLampSwitchLED", "RelayLampSwitchLED_ADV", "RelaySwitchOnlyPlusQuery_ADV"].includes(node.nodeDefId); } RelaySwitchOnlyPlusQuery.isImplementedBy = isImplementedBy; function create(isy, nodeInfo) { return new RelaySwitchOnlyPlusQuery(isy, nodeInfo); } RelaySwitchOnlyPlusQuery.create = create; RelaySwitchOnlyPlusQuery.Node = RelaySwitchOnlyPlusQuery; RelaySwitchOnlyPlusQuery.Class = RelaySwitchOnlyPlusQuery; let Commands; (function (Commands) { Commands["query"] = "QUERY"; Commands["beep"] = "BEEP"; Commands["backlight"] = "BL"; Commands["writeChanges"] = "WDU"; })(Commands = RelaySwitchOnlyPlusQuery.Commands || (RelaySwitchOnlyPlusQuery.Commands = {})); let Drivers; (function (Drivers) { Drivers["responding"] = "ERR"; })(Drivers = RelaySwitchOnlyPlusQuery.Drivers || (RelaySwitchOnlyPlusQuery.Drivers = {})); })(RelaySwitchOnlyPlusQuery || (RelaySwitchOnlyPlusQuery = {})); //# sourceMappingURL=RelaySwitchOnlyPlusQuery.js.map