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

Simple custom button

Scheduled Pinned Locked Moved Scripts
5 Posts 2 Posters 1.6k 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 29 Nov 2017, 21:43

    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.

    J 1 Reply Last reply 30 Nov 2017, 14:14 Reply Quote 0
    • J Offline
      jkandasa @heyjay
      last edited by 30 Nov 2017, 14:14

      @heyjay does this example fulfill your requirement?

      H 1 Reply Last reply 30 Nov 2017, 15:30 Reply Quote 0
      • H Offline
        heyjay @jkandasa
        last edited by 30 Nov 2017, 15:30

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

        J 1 Reply Last reply 1 Dec 2017, 07:50 Reply Quote 0
        • J Offline
          jkandasa @heyjay
          last edited by 1 Dec 2017, 07:50

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

          H 1 Reply Last reply 1 Dec 2017, 21:14 Reply Quote 0
          • H Offline
            heyjay @jkandasa
            last edited by 1 Dec 2017, 21:14

            @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
            2 out of 5
            • First post
              2/5
              Last post

            0

            Online

            620

            Users

            531

            Topics

            3.4k

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