Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Single Light Widget
#1
I would like to create a Single light widget, something like the attached, with an on/off button, slider for dimmer and graphical indicator for for dim status.

[Image: attachment.php?attachmentid=1&d=1150903766]

I would like to pass to it a variable indicating which light it needs to control.

Also I would like to include a drop-down list of all the lights in the house from which I could select the light to control.

Is this possible?
Reply
#2
You cannot do a drop down list. We will have a scrollable list in the next release, but that won't help you now. You'll have to have a set of buttons that let the user select which one to control.

This will be much easier in 1.7, but for now the way you would do this is:

1. Create a small overlay widget where this light control 'multi-widget' will go
2. Set up a set of buttons that select which light. Each of them just sets one or more variables that indicates the light to control (probably just storing the relevant field names) and then reloads the little overlay.
3. Create a template that has the three widgets on it. In the Base tab give them all names so that they can be targeted. Use the Xlat tab of the template to set up a translation for that light indicator, slider, and button, using the values in the previously set variables
4. Use a simple CML macro that you invoke from the button to which you pass one of the variable values, and it uses to do the actual write to the field.

The reason for #4 is just a practical one that in the currently version you cannot enter a manual value for the field to write to, so there's no way to use the variable names you set in the button press step. SO you cannot dynamically select a target field. But you can write a little macro that takes the name of a field to write to, becase the macro parameter value is an open ended value you can type whatever you want into.
Dean Roddey
Explorans limites defectum
Reply
#3
I think I will wait until next release. Estimate on when that will be?
Reply
#4
Hard to say at this point. Not next week or anything.
Dean Roddey
Explorans limites defectum
Reply
#5
[Image: attachment.php?attachmentid=1&d=1150903766]


With the current version, what is the best way create the subject reusable widget?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Timbertech RGBW post cap light retrofit and CQC kfly 4 1,193 07-24-2021, 04:41 AM
Last Post: kfly
  Video Widget znelbok 67 38,901 04-12-2017, 04:08 PM
Last Post: Dean Roddey
  An idea for a new widget Dean Roddey 5 4,340 03-13-2017, 02:47 PM
Last Post: potts.mike
  Web browser widget Trioxide 7 5,524 02-25-2017, 06:30 AM
Last Post: Trioxide
  Use single On/Off/Slider to control group jkmonroe 3 3,186 08-06-2016, 09:28 AM
Last Post: pinballmark
  Slider Widget potts.mike 1 2,120 04-19-2016, 04:59 PM
Last Post: Dean Roddey
  Adding Christmas Light control to CQC with Lutron HW8 avtexan 10 6,835 11-18-2015, 12:35 PM
Last Post: avtexan
  Field Incr/Decr Button Widget khill 15 7,856 05-17-2015, 01:04 PM
Last Post: dlmorgan999
  Overlay in an Overlay triggered by Widget Deane Johnson 4 3,838 11-09-2014, 10:29 AM
Last Post: Deane Johnson
  new widget, scheduled event modifier willplaice 2 2,241 01-14-2013, 01:33 PM
Last Post: willplaice

Forum Jump:


Users browsing this thread: 1 Guest(s)