# Changing node change a number

**URL:** https://discourse.nodered.org/t/changing-node-change-a-number/71311
**Category:** General
**Created:** [27 November 2022 09:52 UTC](https://discourse.nodered.org/t/changing-node-change-a-number/71311 "2022-11-27T09:52:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Herbert](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@Herbert](https://discourse.nodered.org/u/Herbert)
#### Post date: [27 November 2022 09:52 UTC](https://discourse.nodered.org/t/changing-node-change-a-number/71311/1 "2022-11-27T09:52:44Z")

</div>

Hello,

I have a short question for my heating system at home.

I have set temperatures from 10 to 30 degreed.  
if the set value is under 18, then the changing node have to change it to 18 back.

```auto
[
    {
        "id": "aa53b2534b60a64a",
        "type": "inject",
        "z": "1a0d5b259b9dac43",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "21",
        "payloadType": "num",
        "x": 270,
        "y": 320,
        "wires": [
            [
                "2a5315906043b90c",
                "de30d778c529f126"
            ]
        ]
    },
    {
        "id": "7beaf9a86a98fcf5",
        "type": "inject",
        "z": "1a0d5b259b9dac43",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "16",
        "payloadType": "num",
        "x": 270,
        "y": 400,
        "wires": [
            [
                "2a5315906043b90c",
                "de30d778c529f126"
            ]
        ]
    },
    {
        "id": "2cbe9c7f1177aefb",
        "type": "inject",
        "z": "1a0d5b259b9dac43",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "18",
        "payloadType": "num",
        "x": 270,
        "y": 360,
        "wires": [
            [
                "2a5315906043b90c",
                "de30d778c529f126"
            ]
        ]
    },
    {
        "id": "9be09b68b1d93474",
        "type": "inject",
        "z": "1a0d5b259b9dac43",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "10",
        "payloadType": "num",
        "x": 270,
        "y": 440,
        "wires": [
            [
                "2a5315906043b90c",
                "de30d778c529f126"
            ]
        ]
    },
    {
        "id": "de30d778c529f126",
        "type": "switch",
        "z": "1a0d5b259b9dac43",
        "name": "kleiner als 18 Grad C",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gte",
                "v": "18",
                "vt": "num"
            },
            {
                "t": "btwn",
                "v": "10",
                "vt": "num",
                "v2": "17.5",
                "v2t": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 460,
        "y": 320,
        "wires": [
            [
                "bc7671eb38bb8daf"
            ],
            [
                "f6bdaf5b322e92f8"
            ]
        ]
    },
    {
        "id": "bc7671eb38bb8daf",
        "type": "debug",
        "z": "1a0d5b259b9dac43",
        "name": "Auto und Kühlen",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 950,
        "y": 340,
        "wires": []
    },
    {
        "id": "f6bdaf5b322e92f8",
        "type": "change",
        "z": "1a0d5b259b9dac43",
        "name": "10-17.5 = 18",
        "rules": [
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "payload",
                "fromt": "msg",
                "to": "18",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 630,
        "y": 380,
        "wires": [
            [
                "bc7671eb38bb8daf"
            ]
        ]
    }
]

```

How I can realize that?

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [27 November 2022 10:40 UTC](https://discourse.nodered.org/t/changing-node-change-a-number/71311/2 "2022-11-27T10:40:18Z")

</div>

Instead of using change in the change node, just use set msg.payload to number 18 ?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/3/f3e41d949caac14b300a3661d688d67dfe1a5fa2.png)

---

<div class="post-metadata">

### Author: ![Herbert](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@Herbert](https://discourse.nodered.org/u/Herbert)
#### Post date: [27 November 2022 19:03 UTC](https://discourse.nodered.org/t/changing-node-change-a-number/71311/3 "2022-11-27T19:03:04Z")

</div>

Oh my goodness. That is so easy. I doubt know, why I couldn't find them. Thanks again. Issue closed and have a N.I.C.E. day

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [11 December 2022 19:03 UTC](https://discourse.nodered.org/t/changing-node-change-a-number/71311/4 "2022-12-11T19:03:53Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
