[
{
"id": "1bd658dfcb1604fb",
"type": "api-current-state",
"z": "5622825b657d1a32",
"name": "廊灯",
"server": "fad72bae547fbae9",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "switch.sonoff_101857_3",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 490,
"y": 1220,
"wires": [
[
"51dc987ca1caa5c8"
]
]
},
{
"id": "51dc987ca1caa5c8",
"type": "switch",
"z": "5622825b657d1a32",
"name": "开灯判断",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "off",
"vt": "str"
},
{
"t": "eq",
"v": "on",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 640,
"y": 1220,
"wires": [
[
"8f5fe6861575f52a"
],
[]
]
},
{
"id": "8f5fe6861575f52a",
"type": "api-call-service",
"z": "5622825b657d1a32",
"name": "开灯",
"server": "fad72bae547fbae9",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.sonoff_11857_3"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 810,
"y": 1220,
"wires": [
[]
]
},
{
"id": "28ba9f9ad82b4b91",
"type": "server-state-changed",
"z": "5622825b657d1a32",
"name": "人体存在",
"server": "fad72bae547fbae9",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.hlk_ld2410_a1_occupancy",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 1,
"output_only_on_state_change": true,
"for": "",
"forType": "num",
"forUnits": "seconds",
"ignorePrevStateNull": false,
"ignorePrevStateUnknown": false,
"ignorePrevStateUnavailable": true,
"ignoreCurrentStateUnknown": false,
"ignoreCurrentStateUnavailable": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "eventData"
},
{
"property": "topic",
"propertyType": "msg",
"value": "",
"valueType": "triggerId"
}
],
"x": 60,
"y": 1280,
"wires": [
[
"e9f30df6b63ec8a0"
]
]
},
{
"id": "8a9fc68952af7bd1",
"type": "api-current-state",
"z": "5622825b657d1a32",
"name": "廊灯",
"server": "fad72bae547fbae9",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "switch.sonoff_11857_3",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 990,
"y": 1340,
"wires": [
[
"72dee4c9502fe4ce"
]
]
},
{
"id": "72dee4c9502fe4ce",
"type": "switch",
"z": "5622825b657d1a32",
"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": 1140,
"y": 1340,
"wires": [
[
"c0c449c91eae9f62"
],
[]
]
},
{
"id": "c0c449c91eae9f62",
"type": "api-call-service",
"z": "5622825b657d1a32",
"name": "关灯",
"server": "fad72bae547fbae9",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.sonoff_11857_3"
],
"data": "",
"dataType": "json",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1310,
"y": 1340,
"wires": [
[]
]
},
{
"id": "53d2cd57de2d7b9b",
"type": "time-range-switch",
"z": "5622825b657d1a32",
"name": "白天晚上",
"lat": "22.78880",
"lon": "108.46610",
"startTime": "07:00",
"endTime": "19:00",
"startOffset": "",
"endOffset": "",
"x": 320,
"y": 1180,
"wires": [
[
"0a6bed319cf64083"
],
[
"1bd658dfcb1604fb"
]
]
},
{
"id": "0a6bed319cf64083",
"type": "api-current-state",
"z": "5622825b657d1a32",
"name": "排气扇",
"server": "fad72bae547fbae9",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "switch.sonoff_11857_2",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 490,
"y": 1160,
"wires": [
[
"da2402f8f0ac317c"
]
]
},
{
"id": "da2402f8f0ac317c",
"type": "switch",
"z": "5622825b657d1a32",
"name": "判断",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "off",
"vt": "str"
},
{
"t": "eq",
"v": "on",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 630,
"y": 1160,
"wires": [
[
"c1c0d9363ce59569"
],
[]
]
},
{
"id": "c1c0d9363ce59569",
"type": "api-call-service",
"z": "5622825b657d1a32",
"name": "排气扇开",
"server": "fad72bae547fbae9",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.sonoff_11857_2"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 820,
"y": 1160,
"wires": [
[]
]
},
{
"id": "97b2443d23ed12d3",
"type": "api-call-service",
"z": "5622825b657d1a32",
"name": "排气扇关",
"server": "fad72bae547fbae9",
"version": 5,
"debugenabled": false,
"domain": "switch",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"switch.sonoff_11857_2"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 1000,
"y": 1260,
"wires": [
[]
]
},
{
"id": "fb0c8e9bcf7aca9f",
"type": "time-range-switch",
"z": "5622825b657d1a32",
"name": "白天晚上",
"lat": "22.78880",
"lon": "108.46610",
"startTime": "07:00",
"endTime": "19:00",
"startOffset": "",
"endOffset": "",
"x": 800,
"y": 1300,
"wires": [
[
"97b2443d23ed12d3"
],
[
"8a9fc68952af7bd1"
]
]
},
{
"id": "e9f30df6b63ec8a0",
"type": "switch",
"z": "5622825b657d1a32",
"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": 210,
"y": 1280,
"wires": [
[
"53d2cd57de2d7b9b"
],
[
"8680210c2c3cd162"
]
]
},
{
"id": "8680210c2c3cd162",
"type": "delay",
"z": "5622825b657d1a32",
"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": 360,
"y": 1300,
"wires": [
[
"df68c3d1af45f4ff"
]
]
},
{
"id": "df68c3d1af45f4ff",
"type": "api-current-state",
"z": "5622825b657d1a32",
"name": "当前状态",
"server": "fad72bae547fbae9",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "binary_sensor.hlk_ld2410_a1_occupancy",
"state_type": "str",
"blockInputOverrides": false,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "",
"valueType": "entityState"
},
{
"property": "data",
"propertyType": "msg",
"value": "",
"valueType": "entity"
}
],
"for": "0",
"forType": "num",
"forUnits": "minutes",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 500,
"y": 1300,
"wires": [
[
"b2ac15e043dec647"
]
]
},
{
"id": "b2ac15e043dec647",
"type": "switch",
"z": "5622825b657d1a32",
"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": 630,
"y": 1300,
"wires": [
[],
[
"fb0c8e9bcf7aca9f"
]
]
},
{
"id": "fad72bae547fbae9",
"type": "server",
"name": "Home Assistant",
"version": 5,
"addon": false,
"rejectUnauthorizedCerts": false,
"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
}
]