I’ve been using Homey for a couple of years already just to find out recently the option for adding HomeyScript in the mix of flows. Great feature - already know how to write js so lets do this.
My first requirement would be to be able to check if the user who is changing the on-off state of a device is a parent-user or a child user. I am kinda micro-managing the time spend on digital devices for my children. Time-locks and all the works, Homey also has a share in switching lights and other devices.
But I am having trouble to get a handle on the data that is part of the ‘event’ of switching a device state and the flow that is started as result of this event. I want to be able to get the ‘current user’ or something like that, allowing me to implement a switch-statement and return true or false based on the username or id.
Any help into discovering the options is greatly appreciated.