Hey there! I am wondering if I can make a script which would send to all members a message which consists who fired that script?
My goal is to create a button (for ios app, 3d touch without even opening the app) which would send a critical message like ‘smth is wrong, call me back, {name, who triggered the script}’
I do not know if I can check who fired a script and put that name in the message. Would love to here your suggestions
Yes. Each user in the system has a user id which is part of the contextual data that is wrapped up in the event. I’m 99% NodeRED for all of my automations because it’s easy to hunt and peck around to find this information.
I’ve used user contextual actions on Zwave devices to create a way to manually override. For example, if a zwave paddle switch is pressed, the state change carries a null user in the user context, so I can condition my automations for those lights based upon that. If someone taps the light switch, all automations for that light switch are disabled for 12 hours unless someone turns the light on then off within 2 seconds, or off then on within 2 seconds, depending upon the current state of the light.