@janart19/node-red-fusebox
Version:
A comprehensive collection of custom nodes for interfacing with Fusebox automation controllers - data streams, energy management, and utilities
26 lines (20 loc) • 720 B
JavaScript
module.exports = function (RED) {
function FlowValidatorConfigNode(config) {
RED.nodes.createNode(this, config);
const node = this;
// ---- CONFIG ----
node.name = config.name;
node.enabled = config.enabled !== false; // Default to true
// ---- STATUS ----
// Set initial status
node.status({
fill: node.enabled ? "green" : "grey",
shape: "dot",
text: node.enabled ? "Validation enabled" : "Validation disabled"
});
node.on("close", () => {
node.status({});
});
}
RED.nodes.registerType("fusebox-flow-validator", FlowValidatorConfigNode);
};