Hello everyone,
I’'m new into the Homey community and wanted to create a little plugin to get by lights behaving has i wanted.
I started at first with a little script, where i can use 2 calls to retrieve the list of zones and the list of all the devices connected to my hub
const devices = Object.values(await Homey.devices.getDevices());
const zones = Object.values(await Homey.zones.getZones());
All is working fine with that script so i was happy and wanted to switch to a little plugin of my own to make things a bit more clean.
But, when i’m in my “app.ts” i don’t find anyway to get all the devices connected to the hub. Only the devices created (inside of the drivers folder) inside of the plugin, and that i don’t want. I would like to be able to just fetch all the devices connected to the hub simply, and be able to , for exemple to a
device.setCapabilityValue("onoff", false);
Is there any way to get the list of all the devices connected to the hub inside of the plugin, and not just the devices managed by the plugin itself ?