Skip to content

Cover ‐ 窗帘

Monkey • D • Code edited this page Sep 12, 2023 · 1 revision
[
    {
        "id": "5d908f40e89d2e7d",
        "type": "tab",
        "label": "Cover",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "0a1fccc3303f1515",
        "type": "ha-mqtt-cover",
        "z": "5d908f40e89d2e7d",
        "server": "8672849eb803c6e3",
        "device": "02c940ba547f5196",
        "name": "窗帘",
        "config": "{\"device_class\":\"curtain\"}",
        "x": 450,
        "y": 420,
        "wires": [
            [
                "1e068ca2c9e1e990",
                "22a9f9de9243b5be"
            ],
            [
                "1e068ca2c9e1e990"
            ],
            [
                "1e068ca2c9e1e990"
            ]
        ]
    },
    {
        "id": "d4c4d1efa72e32a9",
        "type": "inject",
        "z": "5d908f40e89d2e7d",
        "name": "Set Entity Info",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "attributes",
                "v": "{\"key\":\"value\"}",
                "vt": "json"
            },
            {
                "p": "position",
                "v": "50",
                "vt": "str"
            },
            {
                "p": "tilt",
                "v": "50",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "open",
        "payloadType": "str",
        "x": 250,
        "y": 420,
        "wires": [
            [
                "0a1fccc3303f1515"
            ]
        ]
    },
    {
        "id": "1e068ca2c9e1e990",
        "type": "debug",
        "z": "5d908f40e89d2e7d",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 670,
        "y": 420,
        "wires": []
    },
    {
        "id": "8585b37803ca3b6a",
        "type": "delay",
        "z": "5d908f40e89d2e7d",
        "name": "",
        "pauseType": "delay",
        "timeout": "5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 240,
        "y": 120,
        "wires": [
            [
                "0a1fccc3303f1515"
            ]
        ]
    },
    {
        "id": "22a9f9de9243b5be",
        "type": "switch",
        "z": "5d908f40e89d2e7d",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "open",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "close",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "stop",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 470,
        "y": 260,
        "wires": [
            [
                "faa2bb54a7ee88ef"
            ],
            [
                "a31ba751987a80a1"
            ],
            [
                "89180822e4e7fccd"
            ]
        ]
    },
    {
        "id": "faa2bb54a7ee88ef",
        "type": "function",
        "z": "5d908f40e89d2e7d",
        "name": "open",
        "func": "return {\n    payload: 'open',\n    position: 100\n};",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 650,
        "y": 220,
        "wires": [
            [
                "8585b37803ca3b6a"
            ]
        ]
    },
    {
        "id": "a31ba751987a80a1",
        "type": "function",
        "z": "5d908f40e89d2e7d",
        "name": "closed",
        "func": "return {\n    payload: 'closed',\n    position: 0\n};",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 650,
        "y": 260,
        "wires": [
            [
                "8585b37803ca3b6a"
            ]
        ]
    },
    {
        "id": "89180822e4e7fccd",
        "type": "function",
        "z": "5d908f40e89d2e7d",
        "name": "stopped",
        "func": "return {\n    payload: 'stopped',\n    position: 50,\n    reset: '中止正在等待的延时'\n};",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 660,
        "y": 300,
        "wires": [
            [
                "8585b37803ca3b6a"
            ]
        ]
    },
    {
        "id": "8672849eb803c6e3",
        "type": "mqtt-broker",
        "name": "",
        "broker": "localhost",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "sessionExpiry": ""
    },
    {
        "id": "02c940ba547f5196",
        "type": "ha-mqtt-device",
        "name": "测试设备",
        "config": ""
    }
]

Clone this wiki locally