Let me know if you need it a different way or something different
[
{
"id": "2b9a8367e25178db",
"type": "api-call-service",
"z": "37aca3e667312fac",
"name": "Bathroom Light",
"server": "4e3730d1.5341d",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_on",
"areaId": [],
"deviceId": [],
"entityId": [
"light.bathroom"
],
"data": "{\"color_name\": \"red\", \"brightness\": \"1\"}",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 820,
"y": 600,
"wires": [
[
"7759ec3c3936c1b6"
]
]
},
{
"id": "20424cd7f1eeb0a4",
"type": "api-call-service",
"z": "37aca3e667312fac",
"name": "Bathroom Light",
"server": "4e3730d1.5341d",
"version": 5,
"debugenabled": false,
"domain": "light",
"service": "turn_off",
"areaId": [],
"deviceId": [],
"entityId": [
"light.bathroom"
],
"data": "",
"dataType": "jsonata",
"mergeContext": "",
"mustacheAltTags": false,
"outputProperties": [],
"queue": "none",
"x": 840,
"y": 760,
"wires": [
[]
]
},
{
"id": "7759ec3c3936c1b6",
"type": "stoptimer2",
"z": "37aca3e667312fac",
"duration": "1",
"durationType": "num",
"units": "Minute",
"payloadtype": "str",
"payloadval": "0",
"name": "",
"x": 840,
"y": 680,
"wires": [
[
"20424cd7f1eeb0a4"
],
[]
]
},
{
"id": "2e33715401bef217",
"type": "server-state-changed",
"z": "37aca3e667312fac",
"name": "Bathroom Motion Sensor",
"server": "4e3730d1.5341d",
"version": 4,
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"entityidfilter": "binary_sensor.lumi_lumi_sensor_motion_aq2_iaszone",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "on",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": true,
"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": 290,
"y": 600,
"wires": [
[
"e6008146c6c48fb5"
],
[]
]
},
{
"id": "e6008146c6c48fb5",
"type": "time-range-switch",
"z": "37aca3e667312fac",
"name": "",
"lat": "33.623857",
"lon": "-117.682358",
"startTime": "20:45",
"endTime": "sunrise",
"startOffset": 0,
"endOffset": "30",
"x": 560,
"y": 600,
"wires": [
[
"2b9a8367e25178db"
],
[]
]
},
{
"id": "4e3730d1.5341d",
"type": "server",
"name": "Home Assistant",
"addon": true,
"rejectUnauthorizedCerts": true,
"ha_boolean": "",
"connectionDelay": false,
"cacheJson": false,
"heartbeat": false,
"heartbeatInterval": "",
"statusSeparator": "",
"enableGlobalContextStore": false
}
]