CCCPaste
[
    {
        "id": "37e1eccd80d14579",
        "type": "server-state-changed",
        "z": "902bccd3.5302c",
        "name": "",
        "server": "9255c353.0ab86",
        "version": 5,
        "outputs": 1,
        "exposeAsEntityConfig": "",
        "entityId": "switch.shellyplus1_90150680b488",
        "entityIdType": "exact",
        "outputInitially": false,
        "stateType": "str",
        "ifState": "",
        "ifStateType": "str",
        "ifStateOperator": "is",
        "outputOnlyOnStateChange": 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": "data",
                "propertyType": "msg",
                "value": "",
                "valueType": "eventData"
            },
            {
                "property": "topic",
                "propertyType": "msg",
                "value": "",
                "valueType": "triggerId"
            }
        ],
        "x": 210,
        "y": 1300,
        "wires": [
            [
                "ddd7a92502d08779"
            ]
        ]
    },
    {
        "id": "ddd7a92502d08779",
        "type": "switch",
        "z": "902bccd3.5302c",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "on",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "off",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 510,
        "y": 1300,
        "wires": [
            [
                "732301d473672877"
            ],
            [
                "dd8c1135f70860d9"
            ]
        ]
    },
    {
        "id": "732301d473672877",
        "type": "delay",
        "z": "902bccd3.5302c",
        "name": "",
        "pauseType": "delay",
        "timeout": "2",
        "timeoutUnits": "hours",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 730,
        "y": 1300,
        "wires": [
            [
                "a46af82bfb4aca50"
            ]
        ]
    },
    {
        "id": "dd8c1135f70860d9",
        "type": "change",
        "z": "902bccd3.5302c",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "reset",
                "pt": "msg",
                "to": "1",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 760,
        "y": 1340,
        "wires": [
            [
                "732301d473672877"
            ]
        ]
    },
    {
        "id": "a46af82bfb4aca50",
        "type": "api-call-service",
        "z": "902bccd3.5302c",
        "name": "",
        "server": "9255c353.0ab86",
        "version": 5,
        "debugenabled": false,
        "domain": "switch",
        "service": "turn_off",
        "areaId": [],
        "deviceId": [],
        "entityId": [
            "switch.shellyplus1_90150680b488"
        ],
        "data": "",
        "dataType": "jsonata",
        "mergeContext": "",
        "mustacheAltTags": false,
        "outputProperties": [],
        "queue": "none",
        "x": 980,
        "y": 1300,
        "wires": [
            []
        ]
    },
    {
        "id": "5cb0c762f2014463",
        "type": "comment",
        "z": "902bccd3.5302c",
        "name": "Предохранитель от работы на ночь",
        "info": "",
        "x": 170,
        "y": 1260,
        "wires": []
    }
]