Changing state of device in Homey without triggering it?

Okey, so the difference between the App SDK and the Web API, is that the App SDK device’s setCapabilityValue stores the new state locally, and triggers updateCapabilityValue, which takes care of running flows, updating UI, etc, but importantly does not trigger the _onSetCapabilityValue that feeds back into the capability listeners of the device, which in turn would result in communicating with the HW.

The Web API’s setCapabilityValue on the other hand feeds into ManagerDevices which plumbs into the core Device’s setCapabilityValue, which triggers _onSetCapabilityValue before updateCapabilityValue.

I’ve filed Expose ManagerDevices updateCapabilityValue to update Homey without triggering setCapabilityValue listeners · Issue #47 · athombv/homey-web-api-issues · GitHub to ask for a updateCapabilityValue in the Web SDK.

1 Like