UNPKG

@pmouli/isy-matter-server

Version:

Service to expose an ISY device as a Matter Border router

46 lines 1.88 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 PowerManagementAlarm extends Base { commands = { QUERY: this.query }; static nodeDefId = "309"; static implements = ['309', "259"]; constructor(isy, nodeInfo) { super(isy, nodeInfo); this.drivers.ALARM = Driver.create("ALARM", this, nodeInfo.state['ALARM'], { uom: UnitOfMeasure.Index, label: "Power Management", name: "powerManagement" }); } async query() { return this.sendCommand("QUERY"); } get powerManagement() { return this.drivers.ALARM?.value; } } NodeFactory.register(PowerManagementAlarm); (function (PowerManagementAlarm) { function is(node) { return ['309'].includes(node.nodeDefId); } PowerManagementAlarm.is = is; function isImplementedBy(node) { return ['309', "306"].includes(node.nodeDefId); } PowerManagementAlarm.isImplementedBy = isImplementedBy; function create(isy, nodeInfo) { return new PowerManagementAlarm(isy, nodeInfo); } PowerManagementAlarm.create = create; PowerManagementAlarm.Node = PowerManagementAlarm; PowerManagementAlarm.Class = PowerManagementAlarm; let Commands; (function (Commands) { Commands["query"] = "QUERY"; })(Commands = PowerManagementAlarm.Commands || (PowerManagementAlarm.Commands = {})); let Drivers; (function (Drivers) { Drivers["powerManagement"] = "ALARM"; })(Drivers = PowerManagementAlarm.Drivers || (PowerManagementAlarm.Drivers = {})); })(PowerManagementAlarm || (PowerManagementAlarm = {})); //# sourceMappingURL=PowerManagementAlarm.js.map