Node red fonction avec retour bouleen

Bonjour,
Je suis vraiment désolé, j’ai beaucoup de questions sur node red.
Voila, J’attend en sortie de la fonction2 msg.payload avec le topic horloge à true / false. Je tourne en rond depuis des heures mais je ne parviens pas au résultat.
Avez vous une idée?
Merci, Nicolas

[
    {
        "id": "4ee53af82431efe2",
        "type": "api-current-state",
        "z": "817328624afeff83",
        "name": "BP Horloge",
        "server": "9bf5a907952a79de",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "input_boolean.notify_ecs_horloge_enedis",
        "state_type": "habool",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "topic",
                "propertyType": "global",
                "value": "ecs_horloge",
                "valueType": "str"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 470,
        "y": 1660,
        "wires": [
            [
                "c5e120eb90b2b0e0"
            ]
        ]
    },
    {
        "id": "959a63bc555d82b1",
        "type": "api-current-state",
        "z": "817328624afeff83",
        "name": "Créneaux",
        "server": "9bf5a907952a79de",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "schedule.ecs_creneaux_hors_contact_enedis",
        "state_type": "habool",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "topic",
                "propertyType": "global",
                "value": "ecs_cre",
                "valueType": "str"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 470,
        "y": 1580,
        "wires": [
            [
                "590dd38b1ab2820c"
            ]
        ]
    },
    {
        "id": "590dd38b1ab2820c",
        "type": "change",
        "z": "817328624afeff83",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "ecs_cre",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "ecs_cre",
                "pt": "global",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 660,
        "y": 1580,
        "wires": [
            [
                "5c68be2545838dc2"
            ]
        ]
    },
    {
        "id": "c5e120eb90b2b0e0",
        "type": "change",
        "z": "817328624afeff83",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "ecs_horloge",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "ecs_horloge",
                "pt": "global",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 660,
        "y": 1660,
        "wires": [
            [
                "5c68be2545838dc2"
            ]
        ]
    },
    {
        "id": "5c68be2545838dc2",
        "type": "join",
        "z": "817328624afeff83",
        "name": "",
        "mode": "custom",
        "build": "object",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": true,
        "timeout": "",
        "count": "2",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 830,
        "y": 1620,
        "wires": [
            [
                "8090327d03bdeae4",
                "6572127e2ec625bc"
            ]
        ]
    },
    {
        "id": "8090327d03bdeae4",
        "type": "function",
        "z": "817328624afeff83",
        "name": "function 2",
        "func": "let sens = {\n   ecs_cre: global.get(\"ecs_cre\"),\n   ecs_horloge: global.get(\"ecs_horloge\")\n}\n\n//let sens = msg.payload\nif ((sens.ecs_cre && sens.ecs_horloge) === true){\n   return [msg.payload = true];\n} else if ((sens.ecs_cre || sens.ecs_horloge) === false){\n   return [msg.payload = false];\n}\n   ",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1020,
        "y": 1620,
        "wires": [
            [
                "939c6da4b8b91685",
                "c1b827f7994cd151"
            ]
        ]
    },
    {
        "id": "939c6da4b8b91685",
        "type": "debug",
        "z": "817328624afeff83",
        "name": "debug 54",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1300,
        "y": 1640,
        "wires": []
    },
    {
        "id": "6572127e2ec625bc",
        "type": "debug",
        "z": "817328624afeff83",
        "name": "debug 55",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1020,
        "y": 1720,
        "wires": []
    },
    {
        "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
    }
]

Bonsoir, c’est quoi que tu cherches à faire ?
Il n’y a aucun déclencheur dans ton flow.

Voila l’intégralité

[
    {
        "id": "fb226846275a1c02",
        "type": "poll-state",
        "z": "817328624afeff83",
        "name": "ECS Scan BP arret forcé",
        "server": "9bf5a907952a79de",
        "version": 2,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "updateinterval": "1",
        "updateIntervalType": "num",
        "updateIntervalUnits": "seconds",
        "outputinitially": false,
        "outputonchanged": false,
        "entity_id": "input_boolean.notify_ecs_arret_force",
        "state_type": "habool",
        "halt_if": "false",
        "halt_if_type": "bool",
        "halt_if_compare": "is",
        "outputs": 2,
        "x": 160,
        "y": 1400,
        "wires": [
            [
                "faac35c108fdab1b",
                "5bb7e08229379e80",
                "ef62ac6726aef882",
                "959a63bc555d82b1",
                "4ee53af82431efe2"
            ],
            [
                "75ae7329e99cc649",
                "81399168a01f299e",
                "39992b35c7f11aa2",
                "ac5e11cb387b75da"
            ]
        ]
    },
    {
        "id": "faac35c108fdab1b",
        "type": "debug",
        "z": "817328624afeff83",
        "name": "debug 53",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 440,
        "y": 1260,
        "wires": []
    },
    {
        "id": "5bb7e08229379e80",
        "type": "api-current-state",
        "z": "817328624afeff83",
        "name": "BP Auto on/off",
        "server": "9bf5a907952a79de",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "input_boolean.ecs_auto_on_off",
        "state_type": "habool",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "topic",
                "propertyType": "global",
                "value": "ecs_auto_onoff",
                "valueType": "str"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 480,
        "y": 1480,
        "wires": [
            [
                "aeb1fb9b057f3af1"
            ]
        ]
    },
    {
        "id": "4ee53af82431efe2",
        "type": "api-current-state",
        "z": "817328624afeff83",
        "name": "BP Horloge",
        "server": "9bf5a907952a79de",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "input_boolean.notify_ecs_horloge_enedis",
        "state_type": "habool",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "topic",
                "propertyType": "global",
                "value": "ecs_horloge",
                "valueType": "str"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 470,
        "y": 1660,
        "wires": [
            [
                "c5e120eb90b2b0e0"
            ]
        ]
    },
    {
        "id": "959a63bc555d82b1",
        "type": "api-current-state",
        "z": "817328624afeff83",
        "name": "Créneaux",
        "server": "9bf5a907952a79de",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "schedule.ecs_creneaux_hors_contact_enedis",
        "state_type": "habool",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "topic",
                "propertyType": "global",
                "value": "ecs_cre",
                "valueType": "str"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 470,
        "y": 1580,
        "wires": [
            [
                "590dd38b1ab2820c"
            ]
        ]
    },
    {
        "id": "b2c72164e045bcc4",
        "type": "api-call-service",
        "z": "817328624afeff83",
        "name": "ECS ON!",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "switch",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "switch.sortie_03"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1580,
        "y": 1440,
        "wires": [
            []
        ]
    },
    {
        "id": "ef62ac6726aef882",
        "type": "api-current-state",
        "z": "817328624afeff83",
        "name": "BP Marche forcée",
        "server": "9bf5a907952a79de",
        "version": 3,
        "outputs": 1,
        "halt_if": "",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "entity_id": "input_boolean.notify_ecs_marche_force",
        "state_type": "habool",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "topic",
                "propertyType": "global",
                "value": "ecs_ma_f",
                "valueType": "str"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 490,
        "y": 1380,
        "wires": [
            [
                "58b4ce70768c9820"
            ]
        ]
    },
    {
        "id": "b8347d939cc9db10",
        "type": "api-call-service",
        "z": "817328624afeff83",
        "name": "ECS OFF !",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "switch",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "switch.sortie_03"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1590,
        "y": 1520,
        "wires": [
            []
        ]
    },
    {
        "id": "f1d358c1efeed7ac",
        "type": "function",
        "z": "817328624afeff83",
        "name": "function 1",
        "func": "let sens = {\n   ecs_ma_f: global.get(\"ecs_ma_f\"),\n   ecs_auto_onoff: global.get(\"ecs_auto_onoff\"),\n   ecs_horloge: global.get(\"msg.ecs_horloge\")\n}\n\n//let sens = msg.payload\nif ( (sens.ecs_ma_f || sens.ecs_auto_onoff || sens.ecs_horloge) === true){\n   return [msg, null];\n}else if ( (sens.ecs_ma_f && sens.ecs_auto_onoff && sens.ecs_horloge) === false){\n   return [null, msg];\n}\n\n   ",
        "outputs": 2,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1420,
        "y": 1480,
        "wires": [
            [
                "b2c72164e045bcc4"
            ],
            [
                "b8347d939cc9db10"
            ]
        ]
    },
    {
        "id": "c1b827f7994cd151",
        "type": "join",
        "z": "817328624afeff83",
        "name": "",
        "mode": "custom",
        "build": "object",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": true,
        "timeout": "",
        "count": "3",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 1270,
        "y": 1480,
        "wires": [
            [
                "f1d358c1efeed7ac",
                "29f679ad2945a922"
            ]
        ]
    },
    {
        "id": "58b4ce70768c9820",
        "type": "change",
        "z": "817328624afeff83",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "ecs_ma_f",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "ecs_ma_f",
                "pt": "global",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1000,
        "y": 1380,
        "wires": [
            [
                "c1b827f7994cd151"
            ]
        ]
    },
    {
        "id": "aeb1fb9b057f3af1",
        "type": "change",
        "z": "817328624afeff83",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "ecs_auto_onoff",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "ecs_auto_onoff",
                "pt": "global",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1000,
        "y": 1480,
        "wires": [
            [
                "c1b827f7994cd151"
            ]
        ]
    },
    {
        "id": "590dd38b1ab2820c",
        "type": "change",
        "z": "817328624afeff83",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "ecs_cre",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "ecs_cre",
                "pt": "global",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 660,
        "y": 1580,
        "wires": [
            [
                "5c68be2545838dc2"
            ]
        ]
    },
    {
        "id": "c5e120eb90b2b0e0",
        "type": "change",
        "z": "817328624afeff83",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "ecs_horloge",
                "tot": "str"
            },
            {
                "t": "set",
                "p": "ecs_horloge",
                "pt": "global",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 660,
        "y": 1660,
        "wires": [
            [
                "5c68be2545838dc2"
            ]
        ]
    },
    {
        "id": "5c68be2545838dc2",
        "type": "join",
        "z": "817328624afeff83",
        "name": "",
        "mode": "custom",
        "build": "object",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": true,
        "timeout": "",
        "count": "2",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 830,
        "y": 1620,
        "wires": [
            [
                "8090327d03bdeae4",
                "6572127e2ec625bc"
            ]
        ]
    },
    {
        "id": "8090327d03bdeae4",
        "type": "function",
        "z": "817328624afeff83",
        "name": "function 2",
        "func": "let sens = {\n   ecs_cre: global.get(\"ecs_cre\"),\n   ecs_horloge: global.get(\"ecs_horloge\")\n}\n\n//let sens = msg.payload\nif ((sens.ecs_cre && sens.ecs_horloge) === true){\n   return [msg.payload = true];\n} else if ((sens.ecs_cre || sens.ecs_horloge) === false){\n   return [msg.payload = false];\n}\nreturn msg;\n   ",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1020,
        "y": 1620,
        "wires": [
            [
                "939c6da4b8b91685",
                "c1b827f7994cd151"
            ]
        ]
    },
    {
        "id": "939c6da4b8b91685",
        "type": "debug",
        "z": "817328624afeff83",
        "name": "debug 54",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1300,
        "y": 1640,
        "wires": []
    },
    {
        "id": "6572127e2ec625bc",
        "type": "debug",
        "z": "817328624afeff83",
        "name": "debug 55",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1020,
        "y": 1720,
        "wires": []
    },
    {
        "id": "29f679ad2945a922",
        "type": "debug",
        "z": "817328624afeff83",
        "name": "debug 56",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1420,
        "y": 1380,
        "wires": []
    },
    {
        "id": "08ce03bff3f0721b",
        "type": "group",
        "z": "817328624afeff83",
        "name": "ECS OFF !",
        "style": {
            "stroke": "#ff7f7f",
            "label": true,
            "color": "#000000",
            "fill": "#ff7f7f"
        },
        "nodes": [
            "75ae7329e99cc649",
            "81399168a01f299e",
            "39992b35c7f11aa2",
            "ac5e11cb387b75da",
            "d9d6075ba90d9ca3"
        ],
        "x": 374,
        "y": 1839,
        "w": 332,
        "h": 382
    },
    {
        "id": "75ae7329e99cc649",
        "type": "api-call-service",
        "z": "817328624afeff83",
        "g": "08ce03bff3f0721b",
        "name": "ECS Sortie KNX 0.1.37 03 OFF !",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "switch",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "switch.sortie_03"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 540,
        "y": 2180,
        "wires": [
            []
        ]
    },
    {
        "id": "81399168a01f299e",
        "type": "api-call-service",
        "z": "817328624afeff83",
        "g": "08ce03bff3f0721b",
        "name": "BP Auto OFF!",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "input_boolean",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "input_boolean.ecs_auto_on_off"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 480,
        "y": 1960,
        "wires": [
            []
        ]
    },
    {
        "id": "39992b35c7f11aa2",
        "type": "api-call-service",
        "z": "817328624afeff83",
        "g": "08ce03bff3f0721b",
        "name": "BP Marche forcée OFF!",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "input_boolean",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "input_boolean.notify_ecs_marche_force"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 510,
        "y": 1880,
        "wires": [
            []
        ]
    },
    {
        "id": "ac5e11cb387b75da",
        "type": "api-call-service",
        "z": "817328624afeff83",
        "g": "08ce03bff3f0721b",
        "name": "BP Horloge",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "input_boolean",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "input_boolean.notify_ecs_horloge_enedis"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 470,
        "y": 2040,
        "wires": [
            []
        ]
    },
    {
        "id": "d9d6075ba90d9ca3",
        "type": "api-call-service",
        "z": "817328624afeff83",
        "g": "08ce03bff3f0721b",
        "name": "Créneaux",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "input_boolean",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 470,
        "y": 2120,
        "wires": [
            []
        ]
    },
    {
        "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
    }
]

Salut,

je ne comprends pas vraiment la finalité de ce flux.
Mais en tous cas ta « fonction 2 » ne retourne pas de valeur pour toutes les combinaisons des 2 booléens testés… ça retourne true si les 2 sont true et false si la 2 sont false… donc pas de retour si les 2 ont des valeurs différentes… je ne sais pas si c’est voulu de ta part.

De façon générale gérer des combinaisons de flux comme tu fais n’est pas le plus facile.
Dans NR il vaut mieux voir les flux comme linéaires et passer les infos dans des variables du msg, ça évite aussi d’avoir recours à des globales.

Bonjour,
Merci pour ta réponse. Je souhaite pouvoir utiliser le ballon d’eau chaude (ECS) dans plusieurs modes:
image
Le mode arrêt forcé étant le mode prioritaire, je scan l’état du bouton 1 fois par seconde, je profite de ce scan pour donner le tempo aux autres scan de boutons.

Je comprend ta réponse, et en plus de ça, un problème inattendu est survenu! Ce matin, je me suis rendu compte que ce flow générait beaucoup de trafic sur mon bus KNX. Cela venait du lien entre fonction 1 et ECS OFF.

Donc, je viens de tout poser à plat et:


Je dois profiter quelques détails, et ajouter les heures creuse, mais cela fonctionne.

Je continu sur la suite…

Alors pour le trafic c’est normal tu demandes via l’intermédiaire du poll state un scan chaque seconde ! Donc chaque seconde tu demande l’état, info de tout ton système ECS !

Cela doit se faire sur déclencheur non ? Quand tu actionne la marche forcée cela se lance ?
Ou bien a des heures précises quand il est xxhxx alors marche forcée ?
Enfin je partirais plus là dessus

bonjour @jerome6994 , Merci pour ta réponse,

Oui, et pour celà, j’ai totalement repensé l’automatisme dont j’ai fait une capture au dessus et le trafic est de nouveau normal

Cela doit se faire sur déclencheur non ?

Oui

Quand tu actionne la marche forcée cela se lance ?

Oui, la marche forcé comme l’arrêt forcé ont une priorité haute

Ou bien a des heures précises quand il est xxhxx alors marche forcée ?

Pour les heures précises, il y a 2 conditions:
Avoir actionné le bouton d’activation sur le dashboard, être dans le créneau horaire identifié dans le dashboard

pour rappel:
image

Si dessous le code:

[
    {
        "id": "647b70e0d17800aa",
        "type": "group",
        "z": "0f0bc6be16894600",
        "name": "Mode ECS",
        "style": {
            "fill": "#bfbfbf",
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "96a6d1b096527924",
            "60557e618e87e51e",
            "db184fca7fb3627b",
            "0d3731fb095585d4"
        ],
        "x": 38,
        "y": 27,
        "w": 1794,
        "h": 346
    },
    {
        "id": "96a6d1b096527924",
        "type": "group",
        "z": "0f0bc6be16894600",
        "g": "647b70e0d17800aa",
        "name": "Arret forcé, priorité haute",
        "style": {
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "66ed8e5a555dffd6",
            "f98b0c57517eff37"
        ],
        "x": 64,
        "y": 53,
        "w": 678,
        "h": 294
    },
    {
        "id": "66ed8e5a555dffd6",
        "type": "poll-state",
        "z": "0f0bc6be16894600",
        "g": "96a6d1b096527924",
        "name": "ECS Scan BP arret forcé",
        "server": "9bf5a907952a79de",
        "version": 2,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "updateinterval": "1",
        "updateIntervalType": "num",
        "updateIntervalUnits": "seconds",
        "outputinitially": false,
        "outputonchanged": false,
        "entity_id": "input_boolean.notify_ecs_arret_force",
        "state_type": "habool",
        "halt_if": "true",
        "halt_if_type": "bool",
        "halt_if_compare": "is",
        "outputs": 2,
        "x": 190,
        "y": 220,
        "wires": [
            [
                "88f47725924821a1",
                "a1e2ac9a582507e2",
                "58a8fc837e3e585b"
            ],
            []
        ]
    },
    {
        "id": "f98b0c57517eff37",
        "type": "group",
        "z": "0f0bc6be16894600",
        "g": "96a6d1b096527924",
        "name": "ECS OFF !",
        "style": {
            "stroke": "#ff7f7f",
            "label": true,
            "color": "#000000",
            "fill": "#ff7f7f"
        },
        "nodes": [
            "58a8fc837e3e585b",
            "a1e2ac9a582507e2",
            "88f47725924821a1"
        ],
        "x": 404,
        "y": 79,
        "w": 312,
        "h": 242
    },
    {
        "id": "58a8fc837e3e585b",
        "type": "api-call-service",
        "z": "0f0bc6be16894600",
        "g": "f98b0c57517eff37",
        "name": "ECS Sortie KNX 0.1.37 03 OFF !",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "switch",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "switch.sortie_03"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 560,
        "y": 280,
        "wires": [
            []
        ]
    },
    {
        "id": "a1e2ac9a582507e2",
        "type": "api-call-service",
        "z": "0f0bc6be16894600",
        "g": "f98b0c57517eff37",
        "name": "BP Auto OFF!",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "input_boolean",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "input_boolean.ecs_auto_on_off"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 500,
        "y": 200,
        "wires": [
            []
        ]
    },
    {
        "id": "88f47725924821a1",
        "type": "api-call-service",
        "z": "0f0bc6be16894600",
        "g": "f98b0c57517eff37",
        "name": "BP Marche forcée OFF!",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "input_boolean",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "input_boolean.notify_ecs_marche_force"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 530,
        "y": 120,
        "wires": [
            []
        ]
    },
    {
        "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
    },
    {
        "id": "60557e618e87e51e",
        "type": "group",
        "z": "0f0bc6be16894600",
        "g": "647b70e0d17800aa",
        "name": "Marche forcée",
        "style": {
            "label": true,
            "color": "#000000",
            "stroke": "#7f7f7f",
            "fill": "#ffffff",
            "fill-opacity": "0"
        },
        "nodes": [
            "cb04b170d055bcb4",
            "856475808d64e7d8",
            "8ecf6aba4d25b0f9"
        ],
        "x": 804,
        "y": 59,
        "w": 402,
        "h": 122
    },
    {
        "id": "cb04b170d055bcb4",
        "type": "api-call-service",
        "z": "0f0bc6be16894600",
        "g": "60557e618e87e51e",
        "name": "ECS ON!",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "switch",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "switch.sortie_03"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1100,
        "y": 100,
        "wires": [
            []
        ]
    },
    {
        "id": "856475808d64e7d8",
        "type": "api-call-service",
        "z": "0f0bc6be16894600",
        "g": "60557e618e87e51e",
        "name": "ECS OFF !",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "switch",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "switch.sortie_03"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1110,
        "y": 140,
        "wires": [
            []
        ]
    },
    {
        "id": "8ecf6aba4d25b0f9",
        "type": "server-state-changed",
        "z": "0f0bc6be16894600",
        "g": "60557e618e87e51e",
        "name": "BP Marche forcée",
        "server": "9bf5a907952a79de",
        "version": 4,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "input_boolean.notify_ecs_marche_force",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "habool",
        "haltifstate": "true",
        "halt_if_type": "bool",
        "halt_if_compare": "is",
        "outputs": 2,
        "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": "topic",
                "propertyType": "msg",
                "value": "ecs_ma_f",
                "valueType": "str"
            }
        ],
        "x": 910,
        "y": 120,
        "wires": [
            [
                "cb04b170d055bcb4"
            ],
            [
                "856475808d64e7d8"
            ]
        ]
    },
    {
        "id": "db184fca7fb3627b",
        "type": "group",
        "z": "0f0bc6be16894600",
        "g": "647b70e0d17800aa",
        "name": "Auto sur créneaux horaire",
        "style": {
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "a20456a909488283",
            "e44a09d25f98cd30",
            "4a7c92a7ebcf430f",
            "8e0137f5b88998be",
            "6cfc8331696ccdfa",
            "b53507bbd977c0da",
            "c85685a733d5ef45",
            "e8cfc3f881cac401"
        ],
        "x": 1264,
        "y": 59,
        "w": 542,
        "h": 282
    },
    {
        "id": "a20456a909488283",
        "type": "api-call-service",
        "z": "0f0bc6be16894600",
        "g": "db184fca7fb3627b",
        "name": "ECS ON!",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "switch",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "switch.sortie_03"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1700,
        "y": 240,
        "wires": [
            []
        ]
    },
    {
        "id": "e44a09d25f98cd30",
        "type": "api-call-service",
        "z": "0f0bc6be16894600",
        "g": "db184fca7fb3627b",
        "name": "ECS OFF !",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "switch",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "switch.sortie_03"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1710,
        "y": 280,
        "wires": [
            []
        ]
    },
    {
        "id": "4a7c92a7ebcf430f",
        "type": "api-current-state",
        "z": "0f0bc6be16894600",
        "g": "db184fca7fb3627b",
        "name": "Créneaux",
        "server": "9bf5a907952a79de",
        "version": 3,
        "outputs": 2,
        "halt_if": "true",
        "halt_if_type": "bool",
        "halt_if_compare": "is",
        "entity_id": "schedule.ecs_creneaux_hors_contact_enedis",
        "state_type": "habool",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "topic",
                "propertyType": "global",
                "value": "ecs_cre",
                "valueType": "str"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 1530,
        "y": 260,
        "wires": [
            [
                "a20456a909488283"
            ],
            [
                "e44a09d25f98cd30"
            ]
        ]
    },
    {
        "id": "8e0137f5b88998be",
        "type": "api-current-state",
        "z": "0f0bc6be16894600",
        "g": "db184fca7fb3627b",
        "name": "BP Horloge",
        "server": "9bf5a907952a79de",
        "version": 3,
        "outputs": 2,
        "halt_if": "true",
        "halt_if_type": "bool",
        "halt_if_compare": "is",
        "entity_id": "input_boolean.notify_ecs_horloge_enedis",
        "state_type": "habool",
        "blockInputOverrides": false,
        "outputProperties": [
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            },
            {
                "property": "topic",
                "propertyType": "global",
                "value": "ecs_horloge",
                "valueType": "str"
            }
        ],
        "for": "0",
        "forType": "num",
        "forUnits": "minutes",
        "override_topic": false,
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "x": 1530,
        "y": 120,
        "wires": [
            [
                "c85685a733d5ef45"
            ],
            [
                "e8cfc3f881cac401"
            ]
        ]
    },
    {
        "id": "6cfc8331696ccdfa",
        "type": "server-state-changed",
        "z": "0f0bc6be16894600",
        "g": "db184fca7fb3627b",
        "name": "Créneaux",
        "server": "9bf5a907952a79de",
        "version": 4,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "schedule.ecs_creneaux_hors_contact_enedis",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "habool",
        "haltifstate": "true",
        "halt_if_type": "bool",
        "halt_if_compare": "is",
        "outputs": 2,
        "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": "topic",
                "propertyType": "msg",
                "value": "ecs_cre",
                "valueType": "str"
            }
        ],
        "x": 1360,
        "y": 160,
        "wires": [
            [
                "8e0137f5b88998be"
            ],
            [
                "e8cfc3f881cac401"
            ]
        ]
    },
    {
        "id": "b53507bbd977c0da",
        "type": "server-state-changed",
        "z": "0f0bc6be16894600",
        "g": "db184fca7fb3627b",
        "name": "BP Horloge",
        "server": "9bf5a907952a79de",
        "version": 4,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "input_boolean.notify_ecs_horloge_enedis",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "habool",
        "haltifstate": "true",
        "halt_if_type": "bool",
        "halt_if_compare": "is",
        "outputs": 2,
        "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": "topic",
                "propertyType": "msg",
                "value": "ecs_horloge",
                "valueType": "str"
            }
        ],
        "x": 1350,
        "y": 300,
        "wires": [
            [
                "4a7c92a7ebcf430f"
            ],
            [
                "e44a09d25f98cd30"
            ]
        ]
    },
    {
        "id": "c85685a733d5ef45",
        "type": "api-call-service",
        "z": "0f0bc6be16894600",
        "g": "db184fca7fb3627b",
        "name": "ECS ON!",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "switch",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "switch.sortie_03"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1700,
        "y": 100,
        "wires": [
            []
        ]
    },
    {
        "id": "e8cfc3f881cac401",
        "type": "api-call-service",
        "z": "0f0bc6be16894600",
        "g": "db184fca7fb3627b",
        "name": "ECS OFF !",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "switch",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "switch.sortie_03"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1710,
        "y": 140,
        "wires": [
            []
        ]
    },
    {
        "id": "0d3731fb095585d4",
        "type": "group",
        "z": "0f0bc6be16894600",
        "g": "647b70e0d17800aa",
        "name": "Auto sur HC /HP",
        "style": {
            "label": true,
            "color": "#000000"
        },
        "nodes": [
            "aee36a04902670fa",
            "ef5c3bbd8f3b8dc9",
            "094f789f04e19a74"
        ],
        "x": 804,
        "y": 219,
        "w": 402,
        "h": 122
    },
    {
        "id": "aee36a04902670fa",
        "type": "api-call-service",
        "z": "0f0bc6be16894600",
        "g": "0d3731fb095585d4",
        "name": "ECS ON!",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "switch",
        "service": "turn_on",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "switch.sortie_03"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1100,
        "y": 260,
        "wires": [
            []
        ]
    },
    {
        "id": "ef5c3bbd8f3b8dc9",
        "type": "api-call-service",
        "z": "0f0bc6be16894600",
        "g": "0d3731fb095585d4",
        "name": "ECS OFF !",
        "server": "9bf5a907952a79de",
        "version": 5,
        "debugenabled": false,
        "domain": "switch",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "switch.sortie_03"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 1110,
        "y": 300,
        "wires": [
            []
        ]
    },
    {
        "id": "094f789f04e19a74",
        "type": "server-state-changed",
        "z": "0f0bc6be16894600",
        "g": "0d3731fb095585d4",
        "name": "BP Auto on/off",
        "server": "9bf5a907952a79de",
        "version": 4,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "input_boolean.ecs_auto_on_off",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "habool",
        "haltifstate": "true",
        "halt_if_type": "bool",
        "halt_if_compare": "is",
        "outputs": 2,
        "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": "topic",
                "propertyType": "msg",
                "value": "ecs_auto_onoff",
                "valueType": "str"
            }
        ],
        "x": 900,
        "y": 280,
        "wires": [
            [
                "aee36a04902670fa"
            ],
            [
                "ef5c3bbd8f3b8dc9"
            ]
        ]
    }
]

Savez vous si il est possible de créer une sorte de routine ou fonction qui puisse être appelé dans plusieurs flow qui ne sont pas lié.
J’espère m’être bien exprimé…

avec ces nodes
image

1 « J'aime »

Punaise, c’est riche toutes les secondes pour un truc qui n’est même pas à la minute

Les subflows aussi peuvent marcher

https://nodered.org/docs/user-guide/editor/workspace/subflows

les subflows sont même a privilégier si vous appelez plusieurs fois la même routine.
on peut faire autant d’entrées que de sorties voulues en plus.

Sauf erreur de ma part, une entrée maximum et plusieurs sorties possible.
image

effectivement, je voulais dire une entrée et autant de sorties voulues.
en règle général, un node a une entrée et une ou plusieurs sorties

Ok, merci, je viens de tester une routine, ça fonctionne!
Je continue sur mes automatismes