Simple custom button
-
Hi,
I would like to make a simple button to switch on/off a light integrated in a custom widget with some others information which I want to customize with some css.
I found how to display easily temperature / humidity / text for example from uid tags but I can't find any equivalent example for creating this button with java.
Is that possible?
Thanks. -
@heyjay does this example fulfill your requirement?
-
@jkandasa
Actually I already know this example and I implemented this for other stuff. But this time, I would like to make a widget with mixed output text and buttons from html template. This button can looks like the default buttons for switch on/off lights, it doesn't really matter.
I wonder if it is possible because it needs to catch a press button event to send payload to sensor ? or maybe there is a trick for that in java? -
@heyjay You may need to write angular controller and put it on
Utilities >> HTML additional headers >> AngularJS custom controllers
-
@jkandasa Thanks for the tip. I'm not familiar with AngularJS. I will try to learn a bit about this and make something!