You can modify a flow like this one:
Motion Lighting Flow
[
{
"id": "f314f65b.f2f8",
"type": "hubitat device",
"z": "1eb1e8e3.1c3ca7",
"name": "M-GB",
"server": "a22e0ea9.276dc8",
"deviceId": "322",
"attribute": "motion",
"sendEvent": true,
"x": 110,
"y": 3140,
"wires": [
[
"3c7830fc.5b93c8"
]
]
},
{
"id": "3c7830fc.5b93c8",
"type": "switch",
"z": "1eb1e8e3.1c3ca7",
"name": "active/inactive",
"property": "payload.currentValue",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "active",
"vt": "str"
},
{
"t": "eq",
"v": "inactive",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 300,
"y": 3140,
"wires": [
[
"1c868d4c.756a8b"
],
[
"63a711db.7c1eb"
]
]
},
{
"id": "1c868d4c.756a8b",
"type": "change",
"z": "1eb1e8e3.1c3ca7",
"name": "",
"rules": [
{
"t": "delete",
"p": "payload.currentValue",
"pt": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "stop",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 520,
"y": 3140,
"wires": [
[
"5cfa961a.1c424"
]
]
},
{
"id": "63a711db.7c1eb",
"type": "stoptimer",
"z": "1eb1e8e3.1c3ca7",
"duration": "10",
"units": "Minute",
"payloadtype": "num",
"payloadval": "0",
"name": "",
"x": 520,
"y": 3220,
"wires": [
[
"c62cb855.d621b8"
],
[]
]
},
{
"id": "5cfa961a.1c424",
"type": "switch",
"z": "1eb1e8e3.1c3ca7",
"name": "visitor off",
"property": "visitor_status",
"propertyType": "flow",
"rules": [
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 720,
"y": 3140,
"wires": [
[
"7e34fe82.95c6f",
"63a711db.7c1eb"
]
]
},
{
"id": "c62cb855.d621b8",
"type": "switch",
"z": "1eb1e8e3.1c3ca7",
"name": "persist off",
"property": "persist_status",
"propertyType": "flow",
"rules": [
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 702,
"y": 3220,
"wires": [
[
"709f18be.ec9d68",
"b222b838.8b1d78"
]
]
},
{
"id": "7e34fe82.95c6f",
"type": "time-switch",
"z": "1eb1e8e3.1c3ca7",
"name": "Dawn-20 hrs",
"lat": "29.977091",
"lon": "-90.143000",
"startTime": "sunriseEnd",
"endTime": "20:00",
"startOffset": 0,
"endOffset": 0,
"x": 910,
"y": 3140,
"wires": [
[
"f2fa6501.310ce8"
],
[
"54cd6606.908b38"
]
]
},
{
"id": "709f18be.ec9d68",
"type": "hubitat command",
"z": "1eb1e8e3.1c3ca7",
"name": "GB OFF",
"server": "a22e0ea9.276dc8",
"deviceId": "265",
"command": "off",
"commandArgs": "",
"x": 880,
"y": 3200,
"wires": [
[]
]
},
{
"id": "b222b838.8b1d78",
"type": "hubitat command",
"z": "1eb1e8e3.1c3ca7",
"name": "GN OFF",
"server": "662851c4.3ccad",
"deviceId": "275",
"command": "off",
"commandArgs": "",
"x": 880,
"y": 3240,
"wires": [
[]
]
},
{
"id": "f2fa6501.310ce8",
"type": "switch",
"z": "1eb1e8e3.1c3ca7",
"name": "guest bedroom off",
"property": "gb_status",
"propertyType": "flow",
"rules": [
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 1090,
"y": 3100,
"wires": [
[
"81a6fd4b.c98b5"
]
]
},
{
"id": "54cd6606.908b38",
"type": "switch",
"z": "1eb1e8e3.1c3ca7",
"name": "guest nightstand off",
"property": "gn_status",
"propertyType": "flow",
"rules": [
{
"t": "eq",
"v": "off",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 1100,
"y": 3191,
"wires": [
[
"b3344244.ec2fa8"
]
]
},
{
"id": "81a6fd4b.c98b5",
"type": "hubitat command",
"z": "1eb1e8e3.1c3ca7",
"name": "GB ON",
"server": "a22e0ea9.276dc8",
"deviceId": "265",
"command": "on",
"commandArgs": "",
"x": 1100,
"y": 3150,
"wires": [
[]
]
},
{
"id": "b3344244.ec2fa8",
"type": "hubitat command",
"z": "1eb1e8e3.1c3ca7",
"name": "GN ON",
"server": "662851c4.3ccad",
"deviceId": "275",
"command": "setLevel",
"commandArgs": "70",
"x": 1100,
"y": 3239,
"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": "662851c4.3ccad",
"type": "hubitat config",
"z": "",
"name": "HubitatS",
"usetls": false,
"host": "192.168.1.36",
"port": "80",
"token": "5dee560c-c42c-4e4b-bdf7-6bed1bb77371",
"appId": "4489",
"nodeRedServer": "http://192.168.1.4:1880",
"webhookPath": "/hubitat/webhook2"
}
]