hi I’m trying to update my widget based on an event from the device.
In the device I have this.homey.emit(“myEvent”); (which works just fine if I call this.homey.on(“myEvent”) in the same device.
When I call this from the widget I don’t get any event:
Homey.on(“myEvent”, () => doSomething());
does anybody have a tip? I couldn’t find this in the docs, it seems it could be here: Custom Pairing Views | Homey Apps SDK
but that link is not working
You are gold! thanks!
For future reference:
in the device:
this.homey.api.realtime(“myEvent”, …);
in the widget.html:
Homey.on(“myEvent”, () => doSomething());
anyone know if its possible to update the settings? I have 2 settings, and if I select one boolean the dropdown beneath needs to be cleared so set to null for example. I see you can only use getSettings(). normally you can do the.homey.settings.set but this is only for the app settings not the widget settings