Basically use two sequential function nodes to test whether the status of the motion sensor is inactive. And proceed to turn off the light only if both are inactive ....
Dual Motion Sensors
[
{
"id": "8bb772f6.f415c8",
"type": "switch",
"z": "35026d62.1be99a",
"name": "inactive",
"property": "payload.value",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "inactive",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 690,
"y": 1580,
"wires": [
[
"31cfcd42.d21d6a"
]
]
},
{
"id": "6d7c6df3.502094",
"type": "hubitat device",
"z": "35026d62.1be99a",
"name": "Motion - Closet",
"server": "a22e0ea9.276dc8",
"deviceId": "230",
"attribute": "motion",
"sendEvent": true,
"x": 502,
"y": 1579,
"wires": [
[
"8bb772f6.f415c8"
]
]
},
{
"id": "31cfcd42.d21d6a",
"type": "function",
"z": "35026d62.1be99a",
"name": "motion status",
"func": "msg.attribute = \"motion\"\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"x": 300,
"y": 1660,
"wires": [
[
"457b158e.2f122c"
]
]
},
{
"id": "645b3a38.e1cc7c",
"type": "function",
"z": "35026d62.1be99a",
"name": "motion status",
"func": "msg.attribute = \"motion\"\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"x": 300,
"y": 1580,
"wires": [
[
"6d7c6df3.502094"
]
]
},
{
"id": "457b158e.2f122c",
"type": "hubitat device",
"z": "35026d62.1be99a",
"name": "Motion - Guest Bedroom",
"server": "a22e0ea9.276dc8",
"deviceId": "322",
"attribute": "motion",
"sendEvent": true,
"x": 532,
"y": 1659,
"wires": [
[
"e5c16d4b.50ab"
]
]
},
{
"id": "8e191378.f3ab08",
"type": "stoptimer",
"z": "35026d62.1be99a",
"duration": "5",
"units": "Minute",
"payloadtype": "num",
"payloadval": "0",
"name": "",
"x": 640,
"y": 1500,
"wires": [
[
"645b3a38.e1cc7c"
],
[]
]
},
{
"id": "e5c16d4b.50ab",
"type": "switch",
"z": "35026d62.1be99a",
"name": "inactive",
"property": "payload.value",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "inactive",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 750,
"y": 1660,
"wires": [
[
"13151626.7ecfb2"
]
]
},
{
"id": "1d349c90.cfc393",
"type": "switch",
"z": "35026d62.1be99a",
"name": "active/inactive",
"property": "payload.value",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "active",
"vt": "str"
},
{
"t": "eq",
"v": "inactive",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 452,
"y": 1425,
"wires": [
[
"7c3773e0.664dc4",
"6ba6066f.baa66"
],
[
"8e191378.f3ab08"
]
]
},
{
"id": "6ba6066f.baa66",
"type": "change",
"z": "35026d62.1be99a",
"name": "stop",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "STOP",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 450,
"y": 1500,
"wires": [
[
"8e191378.f3ab08"
]
]
},
{
"id": "13151626.7ecfb2",
"type": "change",
"z": "35026d62.1be99a",
"name": "lutron 0",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "0",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 900,
"y": 1600,
"wires": [
[
"904de033.31018"
]
]
},
{
"id": "8605e032.a372d",
"type": "hubitat device",
"z": "35026d62.1be99a",
"name": "Motion - Guest Bedroom",
"server": "a22e0ea9.276dc8",
"deviceId": "322",
"attribute": "motion",
"sendEvent": true,
"x": 208,
"y": 1400,
"wires": [
[
"1d349c90.cfc393"
]
]
},
{
"id": "bb03de87.f27508",
"type": "hubitat device",
"z": "35026d62.1be99a",
"name": "Motion - Closet",
"server": "a22e0ea9.276dc8",
"deviceId": "230",
"attribute": "motion",
"sendEvent": true,
"x": 240,
"y": 1460,
"wires": [
[
"1d349c90.cfc393"
]
]
},
{
"id": "7c3773e0.664dc4",
"type": "change",
"z": "35026d62.1be99a",
"name": "lutron 100",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "100",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 660,
"y": 1420,
"wires": [
[
"904de033.31018"
]
]
},
{
"id": "904de033.31018",
"type": "lutron-control",
"z": "35026d62.1be99a",
"confignode": "a09cd867.559bd8",
"name": "Guest Bedroom",
"x": 980,
"y": 1480,
"wires": []
},
{
"id": "a22e0ea9.276dc8",
"type": "hubitat config",
"z": "",
"name": "HubitatM",
"usetls": false,
"host": "192.168.1.46",
"port": "80",
"token": "496f7f11-256d-44c9-99c6-4ed460d3efb0",
"appId": "1522",
"nodeRedServer": "http://192.168.1.4:1880",
"webhookPath": "/hubitat/webhook"
},
{
"id": "a09cd867.559bd8",
"type": "lutron-config",
"z": "",
"name": "Caseta Pro",
"ipaddress": "192.168.1.32",
"deviceMap": {
"Kitchen Wall": "2",
"Kitchen Tube": "3",
"Hallway": "4",
"Hallway Down Pico": "5",
"Bar": "7",
"Fireplace": "8",
"Dining": "9",
"Dining Pico": "10",
"Bar Pico": "11",
"Guest Bedroom": "12",
"Guest Bedroom Pico": "13",
"Kitchen Pico": "14",
"Catroom": "15",
"Catroom PIco": "16",
"Bedroom": "17",
"Bedroom PIco": "18",
"Hallway Up Pico": "6",
"ALL": "0"
}
}
]