Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "8abc998c.295aa8",
- "type": "comment",
- "z": "65afea36.f08f24",
- "name": "Turn Washroom light on, if left on by mistake",
- "info": "",
- "x": 190,
- "y": 160,
- "wires": []
- },
- {
- "id": "bb68d525.4fedc8",
- "type": "server-state-changed",
- "z": "65afea36.f08f24",
- "name": "Washroom lights on",
- "server": "7dbc1ed6.c0f6e",
- "version": 1,
- "exposeToHomeAssistant": false,
- "haConfig": [
- {
- "property": "name",
- "value": ""
- },
- {
- "property": "icon",
- "value": ""
- }
- ],
- "entityidfilter": "switch.washroom_light",
- "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": 130,
- "y": 440,
- "wires": [
- [
- "659a74a9.36a70c",
- "63018526.00bb0c",
- "3b3ff421.9c37ec",
- "bd7a3908.e83538"
- ],
- [
- "36166ec5.ef0c32"
- ]
- ]
- },
- {
- "id": "659a74a9.36a70c",
- "type": "api-current-state",
- "z": "65afea36.f08f24",
- "name": "Door closed?",
- "server": "7dbc1ed6.c0f6e",
- "version": 1,
- "outputs": 2,
- "halt_if": "off",
- "halt_if_type": "str",
- "halt_if_compare": "is",
- "override_topic": false,
- "entity_id": "binary_sensor.washroom_door",
- "state_type": "str",
- "state_location": "payload",
- "override_payload": "msg",
- "entity_location": "data",
- "override_data": "msg",
- "blockInputOverrides": false,
- "x": 370,
- "y": 440,
- "wires": [
- [
- "52a0f75f.cbfa98"
- ],
- []
- ]
- },
- {
- "id": "98b5b08c.f6471",
- "type": "ha-wait-until",
- "z": "65afea36.f08f24",
- "name": "Wait until door is opened",
- "server": "7dbc1ed6.c0f6e",
- "outputs": 1,
- "entityId": "binary_sensor.washroom_door",
- "entityIdFilterType": "exact",
- "property": "state",
- "comparator": "is",
- "value": "on",
- "valueType": "str",
- "timeout": 0,
- "timeoutType": "num",
- "timeoutUnits": "seconds",
- "entityLocation": "",
- "entityLocationType": "none",
- "checkCurrentState": true,
- "blockInputOverrides": true,
- "x": 570,
- "y": 340,
- "wires": [
- [
- "2e7c89f9.b5b396"
- ]
- ]
- },
- {
- "id": "52a0f75f.cbfa98",
- "type": "ha-wait-until",
- "z": "65afea36.f08f24",
- "name": "Wait until door closed",
- "server": "7dbc1ed6.c0f6e",
- "outputs": 1,
- "entityId": "binary_sensor.washroom_door",
- "entityIdFilterType": "exact",
- "property": "state",
- "comparator": "is",
- "value": "off",
- "valueType": "str",
- "timeout": "0",
- "timeoutType": "num",
- "timeoutUnits": "minutes",
- "entityLocation": "",
- "entityLocationType": "none",
- "checkCurrentState": true,
- "blockInputOverrides": true,
- "x": 560,
- "y": 420,
- "wires": [
- [
- "98b5b08c.f6471"
- ]
- ]
- },
- {
- "id": "b9e5fce8.27d65",
- "type": "api-call-service",
- "z": "65afea36.f08f24",
- "name": "Washroom light off",
- "server": "7dbc1ed6.c0f6e",
- "version": 1,
- "debugenabled": false,
- "service_domain": "switch",
- "service": "turn_off",
- "entityId": "switch.washroom_light",
- "data": "",
- "dataType": "json",
- "mergecontext": "",
- "output_location": "",
- "output_location_type": "none",
- "mustacheAltTags": false,
- "x": 850,
- "y": 420,
- "wires": [
- []
- ]
- },
- {
- "id": "4855df46.d8ed",
- "type": "stoptimer",
- "z": "65afea36.f08f24",
- "duration": "30",
- "units": "Second",
- "payloadtype": "num",
- "payloadval": "0",
- "name": "",
- "x": 850,
- "y": 340,
- "wires": [
- [
- "b9e5fce8.27d65"
- ],
- []
- ]
- },
- {
- "id": "63018526.00bb0c",
- "type": "stoptimer",
- "z": "65afea36.f08f24",
- "duration": "1",
- "units": "Minute",
- "payloadtype": "num",
- "payloadval": "0",
- "name": "",
- "x": 380,
- "y": 660,
- "wires": [
- [
- "b9e5fce8.27d65"
- ],
- []
- ]
- },
- {
- "id": "3b3ff421.9c37ec",
- "type": "trigger-state",
- "z": "65afea36.f08f24",
- "name": "Door opened?",
- "server": "7dbc1ed6.c0f6e",
- "exposeToHomeAssistant": false,
- "haConfig": [
- {
- "property": "name",
- "value": ""
- },
- {
- "property": "icon",
- "value": ""
- }
- ],
- "entityid": "binary_sensor.washroom_door",
- "entityidfiltertype": "exact",
- "debugenabled": false,
- "constraints": [
- {
- "id": "43mgpwhaswd",
- "targetType": "this_entity",
- "targetValue": "",
- "propertyType": "previous_state",
- "propertyValue": "old_state.state",
- "comparatorType": "is",
- "comparatorValueDatatype": "str",
- "comparatorValue": "off"
- }
- ],
- "constraintsmustmatch": "all",
- "outputs": 2,
- "customoutputs": [],
- "outputinitially": false,
- "state_type": "str",
- "x": 380,
- "y": 520,
- "wires": [
- [
- "c55a833b.0461d"
- ],
- []
- ]
- },
- {
- "id": "c55a833b.0461d",
- "type": "change",
- "z": "65afea36.f08f24",
- "name": "Stop timer",
- "rules": [
- {
- "t": "delete",
- "p": "payload",
- "pt": "msg"
- },
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "STOP",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 370,
- "y": 600,
- "wires": [
- [
- "63018526.00bb0c"
- ]
- ]
- },
- {
- "id": "17547bd3.4b9314",
- "type": "ha-wait-until",
- "z": "65afea36.f08f24",
- "name": "Wait until door is opened",
- "server": "7dbc1ed6.c0f6e",
- "outputs": 1,
- "entityId": "binary_sensor.washroom_door",
- "entityIdFilterType": "exact",
- "property": "state",
- "comparator": "is",
- "value": "on",
- "valueType": "str",
- "timeout": 0,
- "timeoutType": "num",
- "timeoutUnits": "seconds",
- "entityLocation": "",
- "entityLocationType": "none",
- "checkCurrentState": true,
- "blockInputOverrides": true,
- "x": 570,
- "y": 180,
- "wires": [
- [
- "4855df46.d8ed"
- ]
- ]
- },
- {
- "id": "2e7c89f9.b5b396",
- "type": "ha-wait-until",
- "z": "65afea36.f08f24",
- "name": "Wait until door closed",
- "server": "7dbc1ed6.c0f6e",
- "outputs": 1,
- "entityId": "binary_sensor.washroom_door",
- "entityIdFilterType": "exact",
- "property": "state",
- "comparator": "is",
- "value": "off",
- "valueType": "str",
- "timeout": "0",
- "timeoutType": "num",
- "timeoutUnits": "minutes",
- "entityLocation": "",
- "entityLocationType": "none",
- "checkCurrentState": true,
- "blockInputOverrides": true,
- "x": 560,
- "y": 260,
- "wires": [
- [
- "17547bd3.4b9314"
- ]
- ]
- },
- {
- "id": "bd7a3908.e83538",
- "type": "trigger-state",
- "z": "65afea36.f08f24",
- "name": "Door closed?",
- "server": "7dbc1ed6.c0f6e",
- "exposeToHomeAssistant": false,
- "haConfig": [
- {
- "property": "name",
- "value": ""
- },
- {
- "property": "icon",
- "value": ""
- }
- ],
- "entityid": "binary_sensor.washroom_door",
- "entityidfiltertype": "exact",
- "debugenabled": false,
- "constraints": [
- {
- "id": "vqg9unzjasd",
- "targetType": "this_entity",
- "targetValue": "",
- "propertyType": "previous_state",
- "propertyValue": "old_state.state",
- "comparatorType": "is",
- "comparatorValueDatatype": "str",
- "comparatorValue": "on"
- }
- ],
- "constraintsmustmatch": "all",
- "outputs": 2,
- "customoutputs": [],
- "outputinitially": false,
- "state_type": "str",
- "x": 110,
- "y": 520,
- "wires": [
- [
- "f64666ca.8af8b8"
- ],
- []
- ]
- },
- {
- "id": "f64666ca.8af8b8",
- "type": "change",
- "z": "65afea36.f08f24",
- "name": "Stop timer",
- "rules": [
- {
- "t": "delete",
- "p": "payload",
- "pt": "msg"
- },
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "STOP",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 110,
- "y": 600,
- "wires": [
- [
- "63018526.00bb0c",
- "33c3a6f2.cbf57a"
- ]
- ]
- },
- {
- "id": "33c3a6f2.cbf57a",
- "type": "change",
- "z": "65afea36.f08f24",
- "name": "Restart flow",
- "rules": [
- {
- "t": "delete",
- "p": "payload",
- "pt": "msg"
- },
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "off",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 110,
- "y": 660,
- "wires": [
- [
- "2e7c89f9.b5b396"
- ]
- ]
- },
- {
- "id": "36166ec5.ef0c32",
- "type": "change",
- "z": "65afea36.f08f24",
- "name": "Stop timer",
- "rules": [
- {
- "t": "delete",
- "p": "payload",
- "pt": "msg"
- },
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "STOP",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 110,
- "y": 380,
- "wires": [
- [
- "4855df46.d8ed"
- ]
- ]
- },
- {
- "id": "7dbc1ed6.c0f6e",
- "type": "server",
- "z": "",
- "name": "Home Assistant",
- "addon": true
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement