Hi, I have a simple homeyduino project. And I want to change a capability state in Homey. But Homey does not change the state.
In the setup I have: Homey.addCapability("onoff", AlarmOnOff);
And this works fine to trigger the arduino.
But when I try to set the capablility inside Arduino and want to change the state in Homey, noting happens.
I tried: Homey.setCapabilityValue("onoff", false);
or Homey.setCapabilityValue("onoff", 0);
or Homey.setCapabilityValue("onoff", "0");
None of them seem to change the state of the tile. What am I missing?
Well… it turns out it is. if I add: Homey.setClass("socket");
it works…
But also when I change it to: Homey.setClass("other");
So it does not default to other even when the documentation stated this.
Then I think it’s some kind of capability caching inside homey even though I removed the device and re-add it. (I did not change the name of the device). If I block out the setclass instruction (basically the old code again) it keeps on working… weird. Ill keep it to “socket” just to be safe.