2023-10-02 21:33:26 +03:00
|
|
|
module.exports = function(RED) {
|
2023-10-02 22:32:55 +03:00
|
|
|
function thermostat(config) {
|
2023-10-02 21:33:26 +03:00
|
|
|
RED.nodes.createNode(this,config);
|
|
|
|
var node = this;
|
|
|
|
node.on('input', function(msg) {
|
2023-10-02 22:55:07 +03:00
|
|
|
msg.payload = msg.payload.toLowerCase();
|
2023-10-02 21:33:26 +03:00
|
|
|
node.send(msg);
|
|
|
|
});
|
|
|
|
}
|
2023-10-02 22:53:03 +03:00
|
|
|
RED.nodes.registerType("c-thermostat", thermostat );
|
2023-10-02 21:33:26 +03:00
|
|
|
}
|