more G-Labs products

Author Topic: How to re-assign standard widgets  (Read 1826 times)

December 27, 2015, 10:49:46 PM
Read 1826 times

pim555

  • ****
  • Information
  • Sr. Member
  • Posts: 143
Hi,

How do I best assign new widgets for standard controls like light, dimmer, etc. ?

Would like to keep the existing widgets but defined new ones with a different name but do not see how I can assign a new widget for, for example, all light controls?

Cheers
Pim

December 28, 2015, 02:41:09 AM
Reply #1

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
I haven't looked into it, but I suspect you could modify the modules.xml file to point to the appropriate widget.  Assuming so, you could do a search/replace for the widget name in question and replace it with the one you are interested in using.

December 28, 2015, 09:50:13 AM
Reply #2

pim555

  • ****
  • Information
  • Sr. Member
  • Posts: 143
I don't see any reference to the widget definition in that file so I don't think that works. In general, I think this should be a (new) feature in the UI such that you can re-assign widgets to module types?

Cheers
Pim

December 28, 2015, 03:37:07 PM
Reply #3

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
You can do it in the parameter popup of the Module (Group configuration).
If the parameter doesn't exist you can create it.
Only replace the name of any existing parameter set the value and record. Don't worry the other parameter is not lost. Only call the parameter popup and all parameters appear with the new one.

Cheers
Dani

December 28, 2015, 08:37:51 PM
Reply #4

pim555

  • ****
  • Information
  • Sr. Member
  • Posts: 143
Hey Dani,

So what variable is used to identify the appropriate widget? Let's say I have a new widget called light_minimal, what variable to I need to set as part of the module parameter popup?

Btw, I still believe that I would make sense if you could overrule all switch, light, dimmer, etc. widgets in one go. That would allow to install a new set of widgets in one go.

Cheers,
Pim

December 28, 2015, 09:43:08 PM
Reply #5

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Sorry I forgot to join the screenshot
The parameter is Widget.DisplayModule

December 28, 2015, 11:25:50 PM
Reply #6

pim555

  • ****
  • Information
  • Sr. Member
  • Posts: 143
Hi Dani,

How do I add a new parameter (without overwriting another one)?

Cheers
Pim

December 29, 2015, 11:29:18 AM
Reply #7

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Look at my comment upstairs, for create a new parameter you must overwrite one and save. After saving, if you close and open the popup all old parameters with the new one appear.

December 29, 2015, 09:28:55 PM
Reply #8

pim555

  • ****
  • Information
  • Sr. Member
  • Posts: 143