NodeRED. Set GridSetpoint to a negative value

I’m trying to set different Grid Setpoints at different times of day. I’m OK with triggering for the required times, but I can’t work out how to set negative values for the Setpoint.

eg. When I Set msg.payload to the value -90 the GX changes the setpoint to 90

I’m using the graphical interface.

Any hints very gratefully received.

Hello
It would be interesting to know why this change was made.
In my case, I do this to give the immersion heater priority once the minimum SOC of 65% is reached. To do this, Node-RED applies a negative setpoint in steps down to -2000, while preventing battery discharge.
The control node is a control-setting.

Does this not work (inject node)

Thank you for your replies. I seem to have things more under control now. I think what was throwing me was that there seems to be an initial fallback to a default value somewhere.
But the following flow is basically what I’m looking for. I can tweak from here. Hope it helps someone else get started in the future.

[
    {
        "id": "e44b97ccfb3d7e87",
        "type": "tab",
        "label": "Octopus Power Down",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "a09882bdbe92de34",
        "type": "change",
        "z": "e44b97ccfb3d7e87",
        "name": "Set Payload to -90W",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "-100",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 820,
        "y": 140,
        "wires": [
            [
                "4147210ea3bdb0dc"
            ]
        ]
    },
    {
        "id": "66f71c613acc0964",
        "type": "switch",
        "z": "e44b97ccfb3d7e87",
        "name": "Diff depend on hour",
        "property": "hour",
        "propertyType": "msg",
        "rules": [
            {
                "t": "btwn",
                "v": "0",
                "vt": "num",
                "v2": "11",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "11",
                "vt": "num",
                "v2": "12",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "18",
                "vt": "num",
                "v2": "19",
                "v2t": "num"
            },
            {
                "t": "gte",
                "v": "19",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 4,
        "x": 550,
        "y": 200,
        "wires": [
            [
                "a09882bdbe92de34"
            ],
            [
                "a536d6ac286b1db0"
            ],
            [
                "41b18b98157aad75"
            ],
            [
                "57a02921b771b0ba"
            ]
        ]
    },
    {
        "id": "c6b9af939a101631",
        "type": "moment",
        "z": "e44b97ccfb3d7e87",
        "name": "Identify current hour",
        "topic": "",
        "input": "payload",
        "inputType": "msg",
        "inTz": "ETC/UTC",
        "adjAmount": "1",
        "adjType": "hours",
        "adjDir": "add",
        "format": "HH",
        "locale": "London",
        "output": "hour",
        "outputType": "msg",
        "outTz": "ETC/UTC",
        "x": 320,
        "y": 200,
        "wires": [
            [
                "66f71c613acc0964"
            ]
        ]
    },
    {
        "id": "7d508202fa488698",
        "type": "inject",
        "z": "e44b97ccfb3d7e87",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "10",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 130,
        "y": 200,
        "wires": [
            [
                "c6b9af939a101631"
            ]
        ]
    },
    {
        "id": "78ac1dee942a3c49",
        "type": "comment",
        "z": "e44b97ccfb3d7e87",
        "name": "For BST set offset to +1 hour",
        "info": "",
        "x": 320,
        "y": 160,
        "wires": []
    },
    {
        "id": "4147210ea3bdb0dc",
        "type": "victron-output-ess",
        "z": "e44b97ccfb3d7e87",
        "service": "com.victronenergy.settings",
        "path": "/Settings/CGwacs/AcPowerSetPoint",
        "serviceObj": {
            "service": "com.victronenergy.settings",
            "name": "Venus settings",
            "communityTag": "ess"
        },
        "pathObj": {
            "path": "/Settings/CGwacs/AcPowerSetPoint",
            "type": "integer",
            "name": "Grid set-point (W)",
            "mode": "both"
        },
        "initial": 90,
        "name": "",
        "onlyChanges": false,
        "roundValues": "no",
        "outputs": 0,
        "x": 1100,
        "y": 140,
        "wires": []
    },
    {
        "id": "41b18b98157aad75",
        "type": "change",
        "z": "e44b97ccfb3d7e87",
        "name": "Set Payload to -1200W",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "-1200",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 830,
        "y": 260,
        "wires": [
            [
                "41cd2d97a02d1684"
            ]
        ]
    },
    {
        "id": "57a02921b771b0ba",
        "type": "change",
        "z": "e44b97ccfb3d7e87",
        "name": "Set Payload to -100W",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "-110",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 820,
        "y": 320,
        "wires": [
            [
                "1e6327b4a97148b1"
            ]
        ]
    },
    {
        "id": "1e6327b4a97148b1",
        "type": "victron-output-ess",
        "z": "e44b97ccfb3d7e87",
        "service": "com.victronenergy.settings",
        "path": "/Settings/CGwacs/AcPowerSetPoint",
        "serviceObj": {
            "service": "com.victronenergy.settings",
            "name": "Venus settings",
            "communityTag": "ess"
        },
        "pathObj": {
            "path": "/Settings/CGwacs/AcPowerSetPoint",
            "type": "integer",
            "name": "Grid set-point (W)",
            "mode": "both"
        },
        "initial": 90,
        "name": "",
        "onlyChanges": false,
        "roundValues": "no",
        "outputs": 0,
        "x": 1100,
        "y": 320,
        "wires": []
    },
    {
        "id": "41cd2d97a02d1684",
        "type": "victron-output-ess",
        "z": "e44b97ccfb3d7e87",
        "service": "com.victronenergy.settings",
        "path": "/Settings/CGwacs/AcPowerSetPoint",
        "serviceObj": {
            "service": "com.victronenergy.settings",
            "name": "Venus settings",
            "communityTag": "ess"
        },
        "pathObj": {
            "path": "/Settings/CGwacs/AcPowerSetPoint",
            "type": "integer",
            "name": "Grid set-point (W)",
            "mode": "both"
        },
        "initial": 1200,
        "name": "",
        "onlyChanges": false,
        "roundValues": "no",
        "outputs": 0,
        "x": 1100,
        "y": 260,
        "wires": []
    },
    {
        "id": "30bc8a3f4c3dcc99",
        "type": "victron-output-ess",
        "z": "e44b97ccfb3d7e87",
        "service": "com.victronenergy.settings",
        "path": "/Settings/CGwacs/AcPowerSetPoint",
        "serviceObj": {
            "service": "com.victronenergy.settings",
            "name": "Venus settings"
        },
        "pathObj": {
            "path": "/Settings/CGwacs/AcPowerSetPoint",
            "type": "integer",
            "name": "Grid set-point (W)",
            "mode": "both"
        },
        "initial": -99,
        "name": "",
        "onlyChanges": false,
        "roundValues": "no",
        "outputs": 0,
        "x": 400,
        "y": 360,
        "wires": []
    },
    {
        "id": "124ed347ec1e52db",
        "type": "victron-output-ess",
        "z": "e44b97ccfb3d7e87",
        "service": "com.victronenergy.settings",
        "path": "/Settings/CGwacs/AcPowerSetPoint",
        "serviceObj": {
            "service": "com.victronenergy.settings",
            "name": "Venus settings",
            "communityTag": "ess"
        },
        "pathObj": {
            "path": "/Settings/CGwacs/AcPowerSetPoint",
            "type": "integer",
            "name": "Grid set-point (W)",
            "mode": "both"
        },
        "initial": 90,
        "name": "",
        "onlyChanges": false,
        "roundValues": "no",
        "outputs": 0,
        "x": 1100,
        "y": 200,
        "wires": []
    },
    {
        "id": "a536d6ac286b1db0",
        "type": "change",
        "z": "e44b97ccfb3d7e87",
        "name": "Set Payload to -110W",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "-110",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 820,
        "y": 200,
        "wires": [
            [
                "124ed347ec1e52db"
            ]
        ]
    },
    {
        "id": "441db679838c65e2",
        "type": "global-config",
        "env": [],
        "modules": {
            "node-red-contrib-moment": "5.0.0",
            "@victronenergy/node-red-contrib-victron": "1.6.64"
        }
    }
]

It works with a Change :smiley: