NODE-RED, mais comment additionner 2 msg

Bonjour, je cherche réaliser une sorte de feu tricolore qui donne l’efficience de ma consumation en fonction de la production PV, des HC/HP.
J’ai réussi à donner une valeur d’efficience à ma conso et à ma prod. Je souhaite donc faire une moyenne de ces 2 valeurs et c’est sur ce point que je butte.
J’ai un node fonction qui reçois 2 résultats : msg.Conso_Inst et msg.Prod_Inst

var a = msg.Conso_Inst;
var b = msg.Prod_Inst;
msg.payload = a + b;
return msg;

J’ai également essayé

msg.payload = msg.Conso_Inst + msg.Prod_Inst;
return msg;

Je n’arrive pas à faire une addition donc la division, je verrai après…
Merci pour votre aide, Nico

Il faudrait voir le reste du flot… la syntaxe est correcte. Mais comment les valeurs à additionner arrivent?

a mon avis, les valeurs arrivent comme une chaine de caractère et pas comme un nombre (number)…

Hello
As-tu fait un join avant ta fonction ?
https://cookbook.nodered.org/basic/join-streams

+1 @Giga77 la fonction join peut faire le taf

il y a aussi la possibilité de passer directement des variables dans un message payload :

msg.payload = "${msg.Conso_Inst}" "${msg.Prod_Inst}"

A+ Fred

@golfvert
Je crois que effectivement, tu as touché un problème. Merci.

@Steve
Elles arrivent bien en num. Merci

@Giga77
Je n’ai effectivement pas fait de join. Je viens de tester avec le node join en array puis un node change avec comme valeur $sum(payload). Et là, oh miracle je suis bon. Ne reste plus qu’à diviser cela par 2 et je serai bon.

Hors sujet, pour ceux que cela interesse, voila mon code:

[
    {
        "id": "1c488eec22261bbc",
        "type": "server-state-changed",
        "z": "817328624afeff83",
        "name": "Conso_inst",
        "server": "9bf5a907952a79de",
        "version": 4,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sensor.envoy_122132004662_current_power_consumption",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "num",
        "haltifstate": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 1,
        "output_only_on_state_change": false,
        "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": "topic",
                "propertyType": "msg",
                "value": "Conso_Inst",
                "valueType": "num"
            }
        ],
        "x": 160,
        "y": 4000,
        "wires": [
            [
                "70bc1a562664b405",
                "c6c81bdb3885aeb6"
            ]
        ]
    },
    {
        "id": "55af992022f32bb6",
        "type": "server-state-changed",
        "z": "817328624afeff83",
        "name": "Prod-inst",
        "server": "9bf5a907952a79de",
        "version": 4,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "sensor.envoy_122132004662_current_power_production",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "num",
        "haltifstate": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 1,
        "output_only_on_state_change": false,
        "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": "topic",
                "propertyType": "msg",
                "value": "Prod_Inst",
                "valueType": "num"
            }
        ],
        "x": 170,
        "y": 4100,
        "wires": [
            [
                "70bc1a562664b405",
                "c6c81bdb3885aeb6"
            ]
        ]
    },
    {
        "id": "70bc1a562664b405",
        "type": "switch",
        "z": "817328624afeff83",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "nnull"
            },
            {
                "t": "null"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 360,
        "y": 4000,
        "wires": [
            [
                "81087b2b9d7bd2ab",
                "bd02d140c71d6f2b"
            ],
            [
                "57e696ed61e8e447"
            ]
        ]
    },
    {
        "id": "c6c81bdb3885aeb6",
        "type": "switch",
        "z": "817328624afeff83",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "null"
            },
            {
                "t": "nnull"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 360,
        "y": 4100,
        "wires": [
            [
                "b96a8c38631b7e6c"
            ],
            [
                "65c4d4907f98e65d",
                "e26aa1f41b68d903"
            ]
        ]
    },
    {
        "id": "57e696ed61e8e447",
        "type": "change",
        "z": "817328624afeff83",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "0",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 550,
        "y": 4020,
        "wires": [
            [
                "81087b2b9d7bd2ab",
                "bd02d140c71d6f2b"
            ]
        ]
    },
    {
        "id": "b96a8c38631b7e6c",
        "type": "change",
        "z": "817328624afeff83",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "0",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 550,
        "y": 4080,
        "wires": [
            [
                "65c4d4907f98e65d",
                "e26aa1f41b68d903"
            ]
        ]
    },
    {
        "id": "81087b2b9d7bd2ab",
        "type": "debug",
        "z": "817328624afeff83",
        "name": "Conso_Inst",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 820,
        "y": 3680,
        "wires": []
    },
    {
        "id": "65c4d4907f98e65d",
        "type": "debug",
        "z": "817328624afeff83",
        "name": "Prod_Inst",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 810,
        "y": 4420,
        "wires": []
    },
    {
        "id": "bd02d140c71d6f2b",
        "type": "switch",
        "z": "817328624afeff83",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "lt",
                "v": "301",
                "vt": "num"
            },
            {
                "t": "btwn",
                "v": "301",
                "vt": "num",
                "v2": "600",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "601",
                "vt": "num",
                "v2": "900",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "901",
                "vt": "num",
                "v2": "1200",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "1201",
                "vt": "num",
                "v2": "1500",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "1501",
                "vt": "num",
                "v2": "1800",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "1801",
                "vt": "num",
                "v2": "2100",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "2101",
                "vt": "num",
                "v2": "2400",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "2401",
                "vt": "num",
                "v2": "2700",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "2701",
                "vt": "num",
                "v2": "3000",
                "v2t": "num"
            },
            {
                "t": "gt",
                "v": "3000",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 11,
        "x": 820,
        "y": 3820,
        "wires": [
            [
                "5deac668bae59941"
            ],
            [
                "c707ac64d93e2c52"
            ],
            [
                "d60670f8f25d2c2e"
            ],
            [
                "1b3335de9ec1c072"
            ],
            [
                "b5243879c95c232b"
            ],
            [
                "97a75bbfe8a30734"
            ],
            [
                "8c31b2cf45af8ba6"
            ],
            [
                "4bdbeb05a398257d"
            ],
            [
                "70297ae0629677f9"
            ],
            [
                "c01463935a5f3cd2"
            ],
            [
                "5521b1c9bc60f393"
            ]
        ]
    },
    {
        "id": "e26aa1f41b68d903",
        "type": "switch",
        "z": "817328624afeff83",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "lt",
                "v": "250",
                "vt": "str"
            },
            {
                "t": "btwn",
                "v": "250",
                "vt": "num",
                "v2": "500",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "501",
                "vt": "num",
                "v2": "750",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "751",
                "vt": "num",
                "v2": "1000",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "1001",
                "vt": "num",
                "v2": "1250",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "1251",
                "vt": "num",
                "v2": "1500",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "1501",
                "vt": "num",
                "v2": "1750",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "1751",
                "vt": "num",
                "v2": "2000",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "2001",
                "vt": "num",
                "v2": "2250",
                "v2t": "num"
            },
            {
                "t": "btwn",
                "v": "2251",
                "vt": "num",
                "v2": "2500",
                "v2t": "num"
            },
            {
                "t": "gt",
                "v": "2500",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 11,
        "x": 820,
        "y": 4280,
        "wires": [
            [
                "5f76111611407973"
            ],
            [
                "041fa4e06dc8c742"
            ],
            [
                "8a1693300371dbd1"
            ],
            [
                "e65236ddd0eab89c"
            ],
            [
                "d82398833e8f7fff"
            ],
            [
                "694781b9fa571e54"
            ],
            [
                "3fb8eff07d802e40"
            ],
            [
                "ad8ac48cabb68143"
            ],
            [
                "ac30d329d98a7237"
            ],
            [
                "a6c770150620f6f9"
            ],
            [
                "0f2284fc6bebf90b"
            ]
        ]
    },
    {
        "id": "5deac668bae59941",
        "type": "change",
        "z": "817328624afeff83",
        "name": "100%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "100",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 3620,
        "wires": [
            [
                "f72cf2995b7be683",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "c707ac64d93e2c52",
        "type": "change",
        "z": "817328624afeff83",
        "name": "90%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "90",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 3660,
        "wires": [
            [
                "f72cf2995b7be683",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "d60670f8f25d2c2e",
        "type": "change",
        "z": "817328624afeff83",
        "name": "80%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "80",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 3700,
        "wires": [
            [
                "f72cf2995b7be683",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "1b3335de9ec1c072",
        "type": "change",
        "z": "817328624afeff83",
        "name": "70%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "70",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 3740,
        "wires": [
            [
                "f72cf2995b7be683",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "b5243879c95c232b",
        "type": "change",
        "z": "817328624afeff83",
        "name": "60%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "60",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 3780,
        "wires": [
            [
                "f72cf2995b7be683",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "97a75bbfe8a30734",
        "type": "change",
        "z": "817328624afeff83",
        "name": "50%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "50",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 3820,
        "wires": [
            [
                "f72cf2995b7be683",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "8c31b2cf45af8ba6",
        "type": "change",
        "z": "817328624afeff83",
        "name": "40%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "40",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 3860,
        "wires": [
            [
                "f72cf2995b7be683",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "4bdbeb05a398257d",
        "type": "change",
        "z": "817328624afeff83",
        "name": "30%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "30",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 3900,
        "wires": [
            [
                "f72cf2995b7be683",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "70297ae0629677f9",
        "type": "change",
        "z": "817328624afeff83",
        "name": "20%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "20",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 3940,
        "wires": [
            [
                "f72cf2995b7be683",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "c01463935a5f3cd2",
        "type": "change",
        "z": "817328624afeff83",
        "name": "10%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "10",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 3980,
        "wires": [
            [
                "f72cf2995b7be683",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "5521b1c9bc60f393",
        "type": "change",
        "z": "817328624afeff83",
        "name": "00%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "0",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 4020,
        "wires": [
            [
                "f72cf2995b7be683",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "5f76111611407973",
        "type": "change",
        "z": "817328624afeff83",
        "name": "00%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "0",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 4080,
        "wires": [
            [
                "157d53d11ccb4417",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "041fa4e06dc8c742",
        "type": "change",
        "z": "817328624afeff83",
        "name": "10%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "10",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 4120,
        "wires": [
            [
                "157d53d11ccb4417",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "8a1693300371dbd1",
        "type": "change",
        "z": "817328624afeff83",
        "name": "20%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "20",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 4160,
        "wires": [
            [
                "157d53d11ccb4417",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "e65236ddd0eab89c",
        "type": "change",
        "z": "817328624afeff83",
        "name": "30%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "30",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 4200,
        "wires": [
            [
                "157d53d11ccb4417",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "d82398833e8f7fff",
        "type": "change",
        "z": "817328624afeff83",
        "name": "40%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "40",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 4240,
        "wires": [
            [
                "157d53d11ccb4417",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "694781b9fa571e54",
        "type": "change",
        "z": "817328624afeff83",
        "name": "50%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "50",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 4280,
        "wires": [
            [
                "157d53d11ccb4417",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "3fb8eff07d802e40",
        "type": "change",
        "z": "817328624afeff83",
        "name": "60%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "60",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 4320,
        "wires": [
            [
                "157d53d11ccb4417",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "ad8ac48cabb68143",
        "type": "change",
        "z": "817328624afeff83",
        "name": "70%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "70",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 4360,
        "wires": [
            [
                "157d53d11ccb4417",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "ac30d329d98a7237",
        "type": "change",
        "z": "817328624afeff83",
        "name": "80%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "80",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 4400,
        "wires": [
            [
                "157d53d11ccb4417",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "a6c770150620f6f9",
        "type": "change",
        "z": "817328624afeff83",
        "name": "90%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "90",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 4440,
        "wires": [
            [
                "157d53d11ccb4417",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "0f2284fc6bebf90b",
        "type": "change",
        "z": "817328624afeff83",
        "name": "100%",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "100",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1040,
        "y": 4480,
        "wires": [
            [
                "157d53d11ccb4417",
                "8937cfe33a88d46a"
            ]
        ]
    },
    {
        "id": "f72cf2995b7be683",
        "type": "debug",
        "z": "817328624afeff83",
        "name": "% Conso_Inst",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1640,
        "y": 3820,
        "wires": []
    },
    {
        "id": "157d53d11ccb4417",
        "type": "debug",
        "z": "817328624afeff83",
        "name": "% Prod_Inst",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1640,
        "y": 4260,
        "wires": []
    },
    {
        "id": "8937cfe33a88d46a",
        "type": "join",
        "z": "817328624afeff83",
        "name": "effi%",
        "mode": "custom",
        "build": "array",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": false,
        "timeout": "",
        "count": "2",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 1510,
        "y": 4060,
        "wires": [
            [
                "bbf8123a24af4eb5"
            ]
        ]
    },
    {
        "id": "ba9c4c960be2fab6",
        "type": "debug",
        "z": "817328624afeff83",
        "name": "Eficience en %",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1950,
        "y": 4060,
        "wires": []
    },
    {
        "id": "bbf8123a24af4eb5",
        "type": "change",
        "z": "817328624afeff83",
        "name": "$sum(payload)",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "$sum(payload)",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1720,
        "y": 4060,
        "wires": [
            [
                "ba9c4c960be2fab6"
            ]
        ]
    },
    {
        "id": "9bf5a907952a79de",
        "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": ": ",
        "statusYear": "hidden",
        "statusMonth": "short",
        "statusDay": "numeric",
        "statusHourCycle": "default",
        "statusTimeFormat": "h:m",
        "enableGlobalContextStore": false
    }
]