Universal Toggle

Liking the ability to click the Icon :+1:

I configured this widget with a single item (to switch a light on or off), assigned an icon to it.
Light Switch

Clicking on the icon, returned a communication error. Using the browser dev tools I could see that this was a 400 error and that the payload was either true or false. Clicking the slider the payload was either On or Off.

When looking at the widget code, I could see that when the icon was clicked the action was either - true or false. I modified this to be “ON” or “OFF” and now clicking the icon works to turn the switch on or off.

This may only be necessary for items that are switches, so not sure this is the right way to fix the problem I had with clicking the icon. Or would work with other item types.

Posting this for others that may have same issue and anyone else that may have a better “foolproof” solution…

Hmmm in the widget code the commands are set to ON and OFF. Are you sure you changed the commands and not something else?

Your right!! :face_with_open_eyes_and_hand_over_mouth:

I can’t be sure but I may have changed the code in the past to test something and did not reverse the changes.

Thanks again for creating this widget, it’s very much appreciated!