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

    Simple custom button

    Scheduled Pinned Locked Moved Scripts
    5 Posts 2 Posters 1.5k Views 1 Watching
    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 Offline
      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.

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

        @heyjay does this example fulfill your requirement?

        H 1 Reply Last reply Reply Quote 0
        • H Offline
          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?

          jkandasaJ 1 Reply Last reply Reply Quote 0
          • jkandasaJ Offline
            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 Offline
              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

              0

              Online

              587

              Users

              529

              Topics

              3.4k

              Posts
              Copyright © 2015-2025 MyController.org | Contributors | Localization