Trying to store a value in change node and pick it up in switch nodes

So I have made this input number in home assistant to have the possibility to adjust the level of moist when the temporary boost shall start. I thought it would be possible to store the input value and the pick it up and use it.

[
    {
        "id": "a73e6a5ac39cfcdb",
        "type": "group",
        "z": "08f317525b652d66",
        "name": "Boost ventilasjon ved høy fuktighet Bad eller ved for høyt Co2-nivå på Netatmo",
        "style": {
            "stroke": "#000000",
            "fill": "#ffbfbf",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "650cf2521ead4b64",
            "458636f0483f88ab",
            "29fb3626f1f2da63",
            "1fc1fcd8692f8085",
            "291f840ce64f86a8",
            "4aaa2d8f2a6807b7",
            "3e85d54b0ebd02a9",
            "0324fd27b4e6fff5",
            "210df7199fe74712",
            "9e1f9894b100396d",
            "11292244f0f66859",
            "8d1efc570c4ba183",
            "5b93178f57a6c10b",
            "e993ae515ba0cd42",
            "bb2451bb12882f92",
            "f281308276a99359",
            "119999283869e814",
            "c46ae6f135026d33",
            "94abe2bb671940ca",
            "6204e8cd5b9db421",
            "7fc5a742d79b452d"
        ],
        "x": 14,
        "y": 579,
        "w": 1032,
        "h": 502
    },
    {
        "id": "650cf2521ead4b64",
        "type": "api-call-service",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "Ventilasjon Boost 30 min",
        "server": "12135e641a9670e0",
        "version": 5,
        "debugenabled": false,
        "domain": "climate",
        "service": "set_preset_mode",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "climate.ventilasjonsanlegg"
        ],
        "data": "{\"preset_mode\":\"Boost Temporary\"}",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 910,
        "y": 760,
        "wires": [
            [
                "291f840ce64f86a8"
            ]
        ]
    },
    {
        "id": "458636f0483f88ab",
        "type": "poll-state",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "Netatmo Co2 Stue",
        "server": "12135e641a9670e0",
        "version": 2,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "updateinterval": "30",
        "updateIntervalType": "num",
        "updateIntervalUnits": "seconds",
        "outputinitially": false,
        "outputonchanged": false,
        "entity_id": "sensor.netatmo_hjemme_stue_co2",
        "state_type": "num",
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 1,
        "x": 150,
        "y": 620,
        "wires": [
            [
                "0324fd27b4e6fff5"
            ]
        ]
    },
    {
        "id": "29fb3626f1f2da63",
        "type": "poll-state",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "Fuktighet Bad Stort ",
        "server": "12135e641a9670e0",
        "version": 2,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "updateinterval": "30",
        "updateIntervalType": "num",
        "updateIntervalUnits": "seconds",
        "outputinitially": false,
        "outputonchanged": false,
        "entity_id": "sensor.lumi_lumi_weather_humidity",
        "state_type": "num",
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 1,
        "x": 150,
        "y": 760,
        "wires": [
            [
                "4aaa2d8f2a6807b7"
            ]
        ]
    },
    {
        "id": "1fc1fcd8692f8085",
        "type": "poll-state",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "Fuktighet Bad Lite ",
        "server": "12135e641a9670e0",
        "version": 2,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "updateinterval": "30",
        "updateIntervalType": "num",
        "updateIntervalUnits": "seconds",
        "outputinitially": false,
        "outputonchanged": false,
        "entity_id": "sensor.lumi_lumi_weather_humidity_3",
        "state_type": "num",
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 1,
        "x": 150,
        "y": 900,
        "wires": [
            [
                "3e85d54b0ebd02a9"
            ]
        ]
    },
    {
        "id": "291f840ce64f86a8",
        "type": "debug",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "boost",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 930,
        "y": 700,
        "wires": []
    },
    {
        "id": "4aaa2d8f2a6807b7",
        "type": "switch",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "Fukt1 Høy",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gt",
                "v": "global.fukt",
                "vt": "msg"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 330,
        "y": 760,
        "wires": [
            [
                "11292244f0f66859"
            ]
        ],
        "info": "Settes til 50 om vinteren, lavere om sommeren. "
    },
    {
        "id": "3e85d54b0ebd02a9",
        "type": "switch",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "Fukt2 Høy",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gt",
                "v": "global.fukt",
                "vt": "msg"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 330,
        "y": 900,
        "wires": [
            [
                "210df7199fe74712",
                "7fc5a742d79b452d"
            ]
        ],
        "info": "Settes til 50 om vinteren, lavere om sommeren. "
    },
    {
        "id": "0324fd27b4e6fff5",
        "type": "switch",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "Co2 Høy",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gt",
                "v": "1050",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 320,
        "y": 620,
        "wires": [
            [
                "5b93178f57a6c10b"
            ]
        ]
    },
    {
        "id": "210df7199fe74712",
        "type": "rbe",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "",
        "func": "deadbandEq",
        "gap": "20",
        "start": "",
        "inout": "out",
        "septopics": true,
        "property": "payload",
        "topi": "topic",
        "x": 510,
        "y": 900,
        "wires": [
            [
                "9e1f9894b100396d",
                "f281308276a99359"
            ]
        ]
    },
    {
        "id": "9e1f9894b100396d",
        "type": "trigger",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "",
        "op1": "",
        "op2": "0",
        "op1type": "nul",
        "op2type": "num",
        "duration": "29",
        "extend": false,
        "overrideDelay": false,
        "units": "min",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 510,
        "y": 980,
        "wires": [
            [
                "210df7199fe74712"
            ]
        ]
    },
    {
        "id": "11292244f0f66859",
        "type": "rbe",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "",
        "func": "deadbandEq",
        "gap": "20",
        "start": "",
        "inout": "out",
        "septopics": true,
        "property": "payload",
        "topi": "topic",
        "x": 510,
        "y": 760,
        "wires": [
            [
                "8d1efc570c4ba183",
                "bb2451bb12882f92"
            ]
        ]
    },
    {
        "id": "8d1efc570c4ba183",
        "type": "trigger",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "",
        "op1": "",
        "op2": "0",
        "op1type": "nul",
        "op2type": "num",
        "duration": "29",
        "extend": false,
        "overrideDelay": false,
        "units": "min",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 510,
        "y": 840,
        "wires": [
            [
                "11292244f0f66859"
            ]
        ]
    },
    {
        "id": "5b93178f57a6c10b",
        "type": "rbe",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "",
        "func": "deadbandEq",
        "gap": "100",
        "start": "",
        "inout": "out",
        "septopics": true,
        "property": "payload",
        "topi": "topic",
        "x": 510,
        "y": 620,
        "wires": [
            [
                "e993ae515ba0cd42",
                "119999283869e814"
            ]
        ]
    },
    {
        "id": "e993ae515ba0cd42",
        "type": "trigger",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "",
        "op1": "",
        "op2": "0",
        "op1type": "nul",
        "op2type": "num",
        "duration": "29",
        "extend": false,
        "overrideDelay": false,
        "units": "min",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 510,
        "y": 700,
        "wires": [
            [
                "5b93178f57a6c10b"
            ]
        ]
    },
    {
        "id": "bb2451bb12882f92",
        "type": "switch",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "Fukt1_2 Høy",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gt",
                "v": "global.fukt",
                "vt": "msg"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 690,
        "y": 760,
        "wires": [
            [
                "650cf2521ead4b64"
            ]
        ]
    },
    {
        "id": "f281308276a99359",
        "type": "switch",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "Fukt2_2 Høy",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gt",
                "v": "global.fukt",
                "vt": "msg"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 690,
        "y": 900,
        "wires": [
            [
                "650cf2521ead4b64"
            ]
        ]
    },
    {
        "id": "119999283869e814",
        "type": "switch",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "Co2_2 Høy",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gt",
                "v": "1050",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 690,
        "y": 620,
        "wires": [
            [
                "650cf2521ead4b64"
            ]
        ]
    },
    {
        "id": "c46ae6f135026d33",
        "type": "server-state-changed",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "Setverdi for fuktighetsnivå på badene",
        "server": "12135e641a9670e0",
        "version": 4,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "input_number.fuktighet_bad",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 1,
        "output_only_on_state_change": true,
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "data",
                "propertyType": "msg",
                "value": "",
                "valueType": "eventData"
            },
            {
                "property": "topic",
                "propertyType": "msg",
                "value": "",
                "valueType": "triggerId"
            }
        ],
        "x": 190,
        "y": 1040,
        "wires": [
            [
                "94abe2bb671940ca"
            ]
        ]
    },
    {
        "id": "94abe2bb671940ca",
        "type": "change",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "set memory",
        "rules": [
            {
                "t": "set",
                "p": "fukt",
                "pt": "global",
                "to": "payload",
                "tot": "msg",
                "dc": true
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 510,
        "y": 1040,
        "wires": [
            [
                "6204e8cd5b9db421"
            ]
        ]
    },
    {
        "id": "6204e8cd5b9db421",
        "type": "debug",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "Satt fuktighetsnivå",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 890,
        "y": 1040,
        "wires": []
    },
    {
        "id": "7fc5a742d79b452d",
        "type": "debug",
        "z": "08f317525b652d66",
        "g": "a73e6a5ac39cfcdb",
        "name": "debug 302",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 910,
        "y": 940,
        "wires": []
    },
    {
        "id": "12135e641a9670e0",
        "type": "server",
        "name": "Home Assistant",
        "version": 5,
        "addon": false,
        "rejectUnauthorizedCerts": true,
        "ha_boolean": "y|yes|true|on|home|open",
        "connectionDelay": true,
        "cacheJson": true,
        "heartbeat": false,
        "heartbeatInterval": "30",
        "areaSelector": "friendlyName",
        "deviceSelector": "friendlyName",
        "entitySelector": "friendlyName",
        "statusSeparator": "at: ",
        "statusYear": "hidden",
        "statusMonth": "short",
        "statusDay": "numeric",
        "statusHourCycle": "h23",
        "statusTimeFormat": "h:m",
        "enableGlobalContextStore": true
    }
]

You need to select global in switch node, not msg.

tried that first, but will try again. Probably did some small mistake the first time and then started overthinking it again.

I noticed you got default as I only get memoryOnly.

Because i have several memory stores. If i do not set one the default is auto picked.

1 Like

But it worked, thought I did it like that the first time but maybe not. Anyways, thanks a lot again!

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