• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Simple custom button

    Scripts
    2
    5
    1163
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      heyjay last edited by

      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.

      jkandasa 1 Reply Last reply Reply Quote 0
      • jkandasa
        jkandasa @heyjay last edited by

        @heyjay does this example fulfill your requirement?

        H 1 Reply Last reply Reply Quote 0
        • H
          heyjay @jkandasa last edited by

          @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?

          jkandasa 1 Reply Last reply Reply Quote 0
          • jkandasa
            jkandasa @heyjay last edited by

            @heyjay You may need to write angular controller and put it on Utilities >> HTML additional headers >> AngularJS custom controllers

            H 1 Reply Last reply Reply Quote 0
            • H
              heyjay @jkandasa last edited by

              @jkandasa Thanks for the tip. I'm not familiar with AngularJS. I will try to learn a bit about this and make something!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              1
              Online

              638
              Users

              495
              Topics

              3.2k
              Posts

              Copyright © 2015-2022 MyController.org | Contributors | Localization