Apologies,
The state machine is from node-red-contrib-persistent-fsm.
I have downloaded the code and will try to format it this time.
[
    {
        "id": "e9ddac5a2b2b3066",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "01d271721edd47f2",
        "type": "ha-switch",
        "z": "e9ddac5a2b2b3066",
        "name": "",
        "version": 0,
        "debugenabled": false,
        "inputs": 0,
        "outputs": 2,
        "entityConfig": "",
        "enableInput": false,
        "outputOnStateChange": false,
        "outputProperties": [
            {
                "property": "outputType",
                "propertyType": "msg",
                "value": "state change",
                "valueType": "str"
            },
            {
                "property": "payload",
                "propertyType": "msg",
                "value": "",
                "valueType": "entityState"
            }
        ],
        "x": 290,
        "y": 320,
        "wires": [
            [
                "f5da37bb74cbf3e4"
            ],
            [
                "43f3fd06928fd495"
            ]
        ]
    },
    {
        "id": "f5da37bb74cbf3e4",
        "type": "change",
        "z": "e9ddac5a2b2b3066",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 470,
        "y": 260,
        "wires": [
            [
                "40851d3422ca7013"
            ]
        ]
    },
    {
        "id": "43f3fd06928fd495",
        "type": "change",
        "z": "e9ddac5a2b2b3066",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 470,
        "y": 360,
        "wires": [
            [
                "40851d3422ca7013"
            ]
        ]
    },
    {
        "id": "40851d3422ca7013",
        "type": "state-machine",
        "z": "e9ddac5a2b2b3066",
        "name": "",
        "triggerProperty": "status",
        "triggerPropertyType": "flow",
        "stateProperty": "status",
        "statePropertyType": "flow",
        "initialDelay": "0",
        "persistOnReload": true,
        "outputStateChangeOnly": false,
        "throwException": false,
        "states": [
            "start"
        ],
        "transitions": [],
        "x": 740,
        "y": 300,
        "wires": [
            []
        ]
    }
]