Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "167fad20.2ea393",
- "type": "ha-get-entities",
- "z": "5ca397bf.911708",
- "server": "3bebce79.1e0962",
- "name": "Get away devices",
- "rules": [
- {
- "property": "entity_id",
- "logic": "starts_with",
- "value": "device_tracker.",
- "valueType": "str"
- },
- {
- "property": "state",
- "logic": "is",
- "value": "not_home",
- "valueType": "str"
- },
- {
- "property": "attributes.source_type",
- "logic": "is",
- "value": "gps",
- "valueType": "str"
- }
- ],
- "output_type": "array",
- "output_empty_results": false,
- "output_location_type": "msg",
- "output_location": "payload",
- "output_results_count": 1,
- "x": 310,
- "y": 520,
- "wires": [
- [
- "6d57350e.37214c"
- ]
- ]
- },
- {
- "id": "190545ea.c8512a",
- "type": "inject",
- "z": "5ca397bf.911708",
- "name": "timestamp",
- "props": [
- {
- "p": "payload"
- }
- ],
- "repeat": "3600",
- "crontab": "",
- "once": false,
- "onceDelay": "1",
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "x": 130,
- "y": 520,
- "wires": [
- [
- "167fad20.2ea393"
- ]
- ]
- },
- {
- "id": "6d57350e.37214c",
- "type": "split",
- "z": "5ca397bf.911708",
- "name": "Split devices",
- "splt": "\\n",
- "spltType": "str",
- "arraySplt": 1,
- "arraySpltType": "len",
- "stream": false,
- "addname": "",
- "x": 490,
- "y": 520,
- "wires": [
- [
- "1e62548c.20438b"
- ]
- ]
- },
- {
- "id": "1e62548c.20438b",
- "type": "string",
- "z": "5ca397bf.911708",
- "name": "Replace device_tracker",
- "methods": [
- {
- "name": "replaceAll",
- "params": [
- {
- "type": "str",
- "value": "device_tracker."
- },
- {
- "type": "str",
- "value": "mobile_app_"
- }
- ]
- }
- ],
- "prop": "payload.entity_id",
- "propout": "payload",
- "object": "msg",
- "objectout": "msg",
- "x": 690,
- "y": 520,
- "wires": [
- [
- "c4a65d7e.0199f"
- ]
- ]
- },
- {
- "id": "c4a65d7e.0199f",
- "type": "api-call-service",
- "z": "5ca397bf.911708",
- "name": "Send notification",
- "server": "3bebce79.1e0962",
- "version": 1,
- "debugenabled": false,
- "service_domain": "notify",
- "service": "{{payload}}",
- "entityId": "",
- "data": "{\"message\":\"This is a test\"}",
- "dataType": "json",
- "mergecontext": "",
- "output_location": "",
- "output_location_type": "none",
- "mustacheAltTags": false,
- "x": 910,
- "y": 520,
- "wires": [
- []
- ]
- },
- {
- "id": "39962b1c.668e34",
- "type": "comment",
- "z": "5ca397bf.911708",
- "name": "Send notifications to mobile devices that are away",
- "info": "",
- "x": 230,
- "y": 460,
- "wires": []
- },
- {
- "id": "3bebce79.1e0962",
- "type": "server",
- "name": "Home Assistant",
- "addon": true
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement