Hey all,
I’ve got several lights that should share/reuse a certain blinking event. For this I’ve made a Homey script.
I now run it by starting with a advanced flow to listen to 3x pressing the button. Then run the script and pass a string with the device.name as an argument. The thing is that when I rename a device, for whatever reason, I have to remember I’ve got flows that have their old names hard programmed in them. So If I forget to change it, it will break the flow.
Now this is why I’m looking for a way to pass the device.id of the button just pressed to the Homey Script. And yes, the ID instead of the name. If there is a way to get the id or name an ID would be quicker. This since in the script I otherwise have to iterate over all the devices. (const devices = await Homey.devices.getDevices({ filter: { name: device_name } });
seems not to work, but that’s off-topic)
How can I grab the just pressed device.id and pass it as an argument to a script?