Nice implementation!
I also want to use this to turn “ON” and “OFF” a switch item, that I have created. But I meet some problems. No matter how I click the toggle in UI, the state of my switch never changes:
{
"link": "http://137.226.248.161:8080/rest/items/gateway_switch",
"state": "OFF",
"editable": true,
"type": "Switch",
"name": "gateway_switch",
"label": "gateway_switch",
"category": "",
"tags": [],
"groupNames": []
}
And the color of the icon does not change either.
Here is also how I configure the widget.
Can someone help me out? Thanks a lot!