When someone leaves, send a push message to that person
Homey hasn’t got a possibility where one can send push messages or push confirmation*** questions to a user, by using tags/variables.
So, no need to create a separate flow/routine for every user anylonger
***) push msgs and confirmations should be responded to within 30 secs. (HomeyScript limit).
Apps used:
How-to fill the user ID variables
- Goto https://tools.developer.homey.app/tools/api-playground
In the code field (with some examples in it), remove all text and enter:
Homey.users.getUsers();
- Now hit the blue RUN button above that field
-
From the returned data, look for similar text, and copy and save these 2 lines for each user:
"name":string"User Name1"
"athomId":string"xxxxxxxxxxxxxxxxxxxxxxxx"
… and so on -
Now create and edit the text variable for each user, ending with
athomID
(for example)
Something like:
-Name:UserName1_athomID
-Value: copy/paste the “athomId” string (without the"
symbols)
TEF:
[TEF:FLOWS:H4sIAAAAAAACA91Ze2/cxhH/KgsigCXk9sTHkty9ICiMNG7StI4b23lAJyj7mNUx5pEXkidbUAXkg7T/9oPlk3R2yZNOJ51NOUkbRIalu93l7Mxv3sPL4DyYXQbKcCWYAgpWasp4llKVpBE1aSZlLuMwzq07VwWzYN1C8+2p7Bb18vM/B5Ogw7W2a4rqLLiaBBwylUmkxPMEKAtDS1VkBc2N4CBSFYcm3VB6iZSeyiVE+6lFKedaKxrFGUNqkaGKJ5JabXOjpNBRInapxXupyZilRhtOjUo4ZbnMqbQipYlKTJprGwnBdqkle6hd+a+Xga6XU39iiv/hotVNseo2RD5zS8/7JfeEDGbHl0GBOzIXmuVa0CzUOWVZbiiPREaZToUOmYCICbzREXn8hDhmvqUlyHNo6Rl0LV2t2wVdtmendXOq68oWzVJ2RV3hMxDMumYNk0A7NoTiLASUOdJWUpaIhAqjLU15yixAonMu3bk3wQyxDifBBX7I8G+NV3uRZnK1mt0v5sTL0qyrT2oD3xTd4nFzNuCETJli4KjGheMAgEecs4jqJEZBZa6olEpSHudgjY3DXEfBCZ5GSzs+8WA5eA3KExwdkRYqc+rERqmnP7Qz8ky2Lbmo1w3RDcgODDmXTSFVCeR420bNCZGVIfNgeeGfP11C28ozmAezefAZXJDjCvV8Q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