This is what I am using currently, I’m sure it could be adapted for your needs with multiple timers in parallel linked in the same way as the existing one.
JSON Flow
[
{
"id": "fb325670eb520f3a",
"type": "server-state-changed",
"z": "084aa90b2e6c74da",
"name": "Movement in living room",
"server": "1c5692e7.3346bd",
"version": 6,
"outputs": 2,
"exposeAsEntityConfig": "",
"entities": {
"entity": [
"binary_sensor.ikea_of_sweden_vallhorn_wireless_motion_sensor"
],
"substring": [],
"regex": []
},
"outputInitially": false,
"stateType": "habool",
"ifState": "true",
"ifStateType": "bool",
"ifStateOperator": "is",
"outputOnlyOnStateChange": false,
"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": 110,
"y": 60,
"wires": [
[
"71382bddc60355e3"
],
[]
]
},
{
"id": "d45f2cf3e520835e",
"type": "api-current-state",
"z": "084aa90b2e6c74da",
"name": "Light on?",
"server": "1c5692e7.3346bd",
"version": 3,
"outputs": 2,
"halt_if": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "light.tapo_smart_bulb",
"state_type": "str",
"blockInputOverrides": true,
"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": 440,
"y": 20,
"wires": [
[],
[
"8d25ae6217c0739b",
"511b1de91378d9b0"
]
]
},
{
"id": "8d25ae6217c0739b",
"type": "api-call-service",
"z": "084aa90b2e6c74da",
"name": "Light On",
"server": "1c5692e7.3346bd",
"version": 7,
"debugenabled": false,
"action": "light.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [
"f2a25f9c8cc5223f935946656e7d227c"
],
"entityId": [],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "light",
"service": "turn_on",
"x": 520,
"y": 100,
"wires": [
[
"edb96456b96d20de"
]
]
},
{
"id": "edb96456b96d20de",
"type": "delay",
"z": "084aa90b2e6c74da",
"name": "",
"pauseType": "delay",
"timeout": "2",
"timeoutUnits": "minutes",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 520,
"y": 180,
"wires": [
[
"fd0ba89b80b8c7f8"
]
]
},
{
"id": "fd0ba89b80b8c7f8",
"type": "api-call-service",
"z": "084aa90b2e6c74da",
"name": "Light Off",
"server": "1c5692e7.3346bd",
"version": 7,
"debugenabled": false,
"action": "light.turn_off",
"floorId": [],
"areaId": [],
"deviceId": [
"f2a25f9c8cc5223f935946656e7d227c"
],
"entityId": [],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "light",
"service": "turn_off",
"x": 510,
"y": 260,
"wires": [
[]
]
},
{
"id": "1b060cbd40d716d1",
"type": "api-current-state",
"z": "084aa90b2e6c74da",
"name": "Dark enough?",
"server": "1c5692e7.3346bd",
"version": 3,
"outputs": 2,
"halt_if": "1000",
"halt_if_type": "num",
"halt_if_compare": "lt",
"entity_id": "sensor.ikea_of_sweden_vallhorn_wireless_motion_sensor_illuminance",
"state_type": "num",
"blockInputOverrides": true,
"outputProperties": [
{
"property": "payload",
"propertyType": "msg",
"value": "true",
"valueType": "bool"
},
{
"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": 260,
"y": 160,
"wires": [
[
"d45f2cf3e520835e"
],
[
"fd0ba89b80b8c7f8"
]
]
},
{
"id": "511b1de91378d9b0",
"type": "api-call-service",
"z": "084aa90b2e6c74da",
"name": "Night light",
"server": "1c5692e7.3346bd",
"version": 7,
"debugenabled": false,
"action": "scene.turn_on",
"floorId": [],
"areaId": [],
"deviceId": [],
"entityId": [
"scene.new_scene_2"
],
"labelId": [],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"blockInputOverrides": true,
"domain": "scene",
"service": "turn_on",
"x": 600,
"y": 20,
"wires": [
[]
]
},
{
"id": "71382bddc60355e3",
"type": "time-range-switch",
"z": "084aa90b2e6c74da",
"name": "Is it time?",
"lat": "",
"lon": "",
"startTime": "00:00",
"endTime": "sunset",
"startOffset": 0,
"endOffset": 0,
"x": 100,
"y": 220,
"wires": [
[
"1b060cbd40d716d1"
],
[
"fd0ba89b80b8c7f8"
]
]
},
{
"id": "1c5692e7.3346bd",
"type": "server",
"name": "Home Assistant",
"addon": true
}
]