[
{
"id": "7d34e824.449118",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": ""
},
{
"id": "b1c69f1f.00145",
"type": "server-state-changed",
"z": "7d34e824.449118",
"name": "Door Opened",
"server": "378bb7a2.0cc518",
"version": 1,
"entityidfilter": "",
"entityidfiltertype": "exact",
"outputinitially": false,
"state_type": "str",
"haltifstate": "open",
"halt_if_type": "str",
"halt_if_compare": "is",
"outputs": 2,
"output_only_on_state_change": true,
"x": 176.5,
"y": 134,
"wires": [
[
"494a41e3.a5a67"
],
[]
]
},
{
"id": "494a41e3.a5a67",
"type": "function",
"z": "7d34e824.449118",
"name": "flow.set('opened',true); // set the variable",
"func": "flow.set('opened',true); // set the variable\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 546.5,
"y": 133,
"wires": [
[]
]
},
{
"id": "75be8c15.448914",
"type": "server-state-changed",
"z": "7d34e824.449118",
"name": "Arm Alarm",
"server": "378bb7a2.0cc518",
"version": 1,
"entityidfilter": "",
"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,
"x": 146.5,
"y": 283,
"wires": [
[
"95bd2d59.e7905"
],
[]
]
},
{
"id": "95bd2d59.e7905",
"type": "function",
"z": "7d34e824.449118",
"name": "flow.set('opened',false); // set the variable",
"func": "flow.set('opened',false); // set the variable\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 410.5,
"y": 281,
"wires": [
[
"9978c76b.ad8188"
]
]
},
{
"id": "9978c76b.ad8188",
"type": "delay",
"z": "7d34e824.449118",
"name": "",
"pauseType": "delay",
"timeout": "35",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"x": 364.5,
"y": 472,
"wires": [
[
"b9f06c47.8c07d"
]
]
},
{
"id": "b9f06c47.8c07d",
"type": "switch",
"z": "7d34e824.449118",
"name": "Was anything opened - expression: flow.get('opened') = false",
"property": "flow.get('opened')",
"propertyType": "jsonata",
"rules": [
{
"t": "false"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 748.5,
"y": 437,
"wires": [
[
"8372fd95.ab038"
]
]
},
{
"id": "8372fd95.ab038",
"type": "debug",
"z": "7d34e824.449118",
"name": "Arm Alarm",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"x": 1112.5,
"y": 417,
"wires": []
},
{
"id": "378bb7a2.0cc518",
"type": "server",
"z": "",
"name": "Home Assistant",
"legacy": false,
"hassio": false,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": true
}
]