Multiple debug messages for a single flow - can't work out why

Hi,

I’ve set up the following flow to monitor my central heating kitchen zone and trigger another flow to heat it if it is below a certain temperature. It’s a bit rudimentary but it works. This afternoon I’ve noticed that for one flow of information from the 5 minute repeating delay to the retrieval of the climate sensor temperature I’m seeing loads of identical debug messages. I cannot work out why.

Can anyone spot anything obvious and help me out at all please?

Many thanks,

Matt

The flow looks like this:

And an export of it is below.

[
    {
        "id": "c6eb1ed7.413fd",
        "type": "tab",
        "label": "Monitor Kitchen",
        "disabled": false,
        "info": ""
    },
    {
        "id": "22e2990.e4ca368",
        "type": "server-state-changed",
        "z": "c6eb1ed7.413fd",
        "name": "monitor kitchen switch on?",
        "server": "9133f0de.c8669",
        "version": 1,
        "exposeToHomeAssistant": false,
        "haConfig": [
            {
                "property": "name",
                "value": ""
            },
            {
                "property": "icon",
                "value": ""
            }
        ],
        "entityidfilter": "input_boolean.monitor_kitchen",
        "entityidfiltertype": "exact",
        "outputinitially": false,
        "state_type": "str",
        "haltifstate": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "outputs": 2,
        "output_only_on_state_change": false,
        "for": 0,
        "forType": "num",
        "forUnits": "minutes",
        "ignorePrevStateNull": false,
        "ignorePrevStateUnknown": false,
        "ignorePrevStateUnavailable": false,
        "ignoreCurrentStateUnknown": false,
        "ignoreCurrentStateUnavailable": false,
        "x": 170,
        "y": 160,
        "wires": [
            [
                "3c65b7f2.055fd8"
            ],
            []
        ]
    },
    {
        "id": "3c65b7f2.055fd8",
        "type": "api-render-template",
        "z": "c6eb1ed7.413fd",
        "name": "kitchen temp",
        "server": "9133f0de.c8669",
        "template": "{{state_attr('climate.kitchen', 'status').temperature}}",
        "resultsLocation": "payload",
        "resultsLocationType": "msg",
        "templateLocation": "",
        "templateLocationType": "none",
        "x": 450,
        "y": 200,
        "wires": [
            [
                "19c0bc4f.fcb974",
                "e9160b99.7d0fd8"
            ]
        ]
    },
    {
        "id": "19c0bc4f.fcb974",
        "type": "debug",
        "z": "c6eb1ed7.413fd",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 650,
        "y": 160,
        "wires": []
    },
    {
        "id": "e9160b99.7d0fd8",
        "type": "switch",
        "z": "c6eb1ed7.413fd",
        "name": "temp <= 16.5?",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "lte",
                "v": "16.5",
                "vt": "str"
            },
            {
                "t": "gt",
                "v": "15.5",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 660,
        "y": 240,
        "wires": [
            [
                "94f880c8.c7a61"
            ],
            [
                "4ff5e6a6.3755c8"
            ]
        ]
    },
    {
        "id": "94f880c8.c7a61",
        "type": "api-current-state",
        "z": "c6eb1ed7.413fd",
        "name": "if kitchen heat is on",
        "server": "9133f0de.c8669",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "input_boolean.kitchen_heat",
        "state_type": "str",
        "state_location": "payload",
        "override_payload": "msg",
        "entity_location": "data",
        "override_data": "msg",
        "blockInputOverrides": false,
        "x": 870,
        "y": 220,
        "wires": [
            [
                "56ed8f1.fb6c07",
                "4ff5e6a6.3755c8"
            ],
            [
                "18589514.84b32b"
            ]
        ]
    },
    {
        "id": "56ed8f1.fb6c07",
        "type": "debug",
        "z": "c6eb1ed7.413fd",
        "name": "kitchen heat already on",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1130,
        "y": 180,
        "wires": []
    },
    {
        "id": "18589514.84b32b",
        "type": "api-call-service",
        "z": "c6eb1ed7.413fd",
        "name": "Call kitchen Heat flow",
        "server": "9133f0de.c8669",
        "version": 1,
        "debugenabled": false,
        "service_domain": "homeassistant",
        "service": "turn_on",
        "entityId": "input_boolean.kitchen_heat",
        "data": "",
        "dataType": "jsonata",
        "mergecontext": "",
        "output_location": "",
        "output_location_type": "none",
        "mustacheAltTags": false,
        "x": 1120,
        "y": 260,
        "wires": [
            [
                "4ff5e6a6.3755c8"
            ]
        ]
    },
    {
        "id": "4ff5e6a6.3755c8",
        "type": "delay",
        "z": "c6eb1ed7.413fd",
        "name": "check again in 5 mins",
        "pauseType": "delay",
        "timeout": "5",
        "timeoutUnits": "minutes",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "x": 940,
        "y": 360,
        "wires": [
            [
                "706f5850.139118"
            ]
        ]
    },
    {
        "id": "706f5850.139118",
        "type": "api-current-state",
        "z": "c6eb1ed7.413fd",
        "name": "on?",
        "server": "9133f0de.c8669",
        "version": 1,
        "outputs": 2,
        "halt_if": "on",
        "halt_if_type": "str",
        "halt_if_compare": "is",
        "override_topic": false,
        "entity_id": "input_boolean.monitor_kitchen",
        "state_type": "str",
        "state_location": "",
        "override_payload": "none",
        "entity_location": "",
        "override_data": "none",
        "blockInputOverrides": false,
        "x": 630,
        "y": 480,
        "wires": [
            [
                "3c65b7f2.055fd8"
            ],
            []
        ]
    },
    {
        "id": "9133f0de.c8669",
        "type": "server",
        "name": "Home Assistant"
    }
]

In your event state node, you need to check ‘Current state equals previous state’. Without that checked, it will keep starting the flow.

Superb! Thank you very much, that worked.