I found out that you can actually, when in settings mode, view the code directly already with some sort of highlighting… So no need to wrap the /n /T …
There is a code sections, a settings and a preview section. To start simple I added a new parameter called “item_fontsize” at the end. At the moment I do use the widget “Showvalues_ON” section to display the status of my windows.
So I quickly changed your ON/OFF to my windows sitecode mapping table “OPEN/CLOSED”. THAT works already.
Then I changed your hardcoded font-size: 16px to --> (config.item_fontsize + “px” ). My assumption was that If now go to config the widget and change the value of the fontsize parameter that the font would change. But it doesn’t.
I saved, refreshed the browser, deleted and re-added the widget on the dashboard but could not get this to work.
So a couple of how-to questions on
how do I correctly debug new code
how do I correctly test new code once saved
how do I correctly publish the widget to the dashboard once code changes has happend.
—> e.g. developer guide but for beginners of openhab/panel
You are talking to a Windows/Batch/VB/ person and not a linux, pyton, java person… so bear with me pls. Once I do get over this hurdle I will make some more modifications, promise.
I tried out your Widget, looks great - thank you. It works well with switches. But there is one thing I cannot find: How did you manage to show numbers (in your example, temperatures)? When I create a new widget, the possible item type selections are only “switch, toggle, rollershutter, windows, showvalues_ON, showvalues_OFF”.
What I do wrong?
Is it possible to trim the background window size to better match the list of items shown - before 1st item & after last item? If in your code, I can change font size, spacing, etc. but the background window always stays the same size.
I have a problem using switch for a group of lamps in this template: clicking on the switch item only OFF commands are sent but the switch item changes the colour to green. Clicking again also OFF is sent to the item and the coulur changes back.
What is going wrong?
Could you modify the Widget so that it does not always show the first 4 chars of the values when Showvalues_(On/Off) is selected? Maybe make it configurable.
In addition a Showvalues without On or Off would be nice so it just displays the values.
The reason behind this is that I’m using the widget to monitor my washing mashine and my dryer. The states may be longer thatn 4 chars, e.g. “Finished” and it looks a little bit uggly to have one of 10 items with a green background just because “Remote Control Activation State” is “On”.
items are listed exactly the same way in file.items
last year the items where listed correct in 3 different multi-state widgets, but now i have one widget with the correct order and two widget with “an alternative” (=wrong) order. already tried to restart openhab and to delete/re-add the widget, but it remains the same. Here’s what it looks like:
I want to use it for a long List.
But the widget must have the size of the Number of the list.
How can i get a scroll down to have a small widget with the full list?
How can i get a scrollbar for long list in a small widget window? I dont understand how and where i have to change the code of the Widget for this case.
Most of my lights are on dimmers, so would like to use this to display all of the Dimmer items, however, Dimmer is not a supported type. Also interested in showing groups of type Contact to cover doors and windows. Any plans to add? Thank you.
Update: I have been able to add Dimmer and Contact type support to the widget. For simplicity, I made Dimmer just like Switch - on/off only.
Contact is similar to Window. Along the way I discovered the code can be confused if there are Things in the group that have never been used (status is NULL) so added handling on Contact for it but left other types alone.
I would like to use the widget, but I have problems with the basics. Unfortunately, I do not know where to get the GroupID. and I do not know how I can create a group, or how I can get in there devices, can someone help me?