I’ve created buttons in habpanel for various things.
And dummy labels that get information from an item e.g.
But is there a standard way to make a button that displays information from an item?
Or am I about to learn how to make custom widgets? I just wanted to make sure I’ve not reinventing the wheel here as it would seem like someone has done this.
Very new to all this and not a web dev so learning a hell of a lot very fast so apologies if I’ve missed something obvious. Thanks in advance.
Yes. This will be on the next release
master ← LuckyMallari:feature/smarterbutton
opened 01:15AM - 29 Dec 17 UTC
Previous conversation:
https://github.com/openhab/org.openhab.ui.habpanel/pull/… 258#issuecomment-354185262
Here's the changes per suggestions:
* Changed "Navigate to dashboard" to "Navigate"
* Change Icons uitab to Display
* Added ability to navigate to an external URL
* Changed ui-select on dashboard select tag
* Use/mimic Dummy widget for Navigate type
* Added ability to show an item value
Basically if you use "Display" on a "Navigate" action type, you can display the Item name/value just like a regular Dummy widget. Same concept as previous PR: ability to navigate to a URL or a dashboard page. Use self/new tab/new window if preferred.
Demo:

I formatted code based on VS Code settings.
You can see actual changes here:
https://github.com/LuckyMallari/org.openhab.ui.habpanel/commit/d56498237fe75cb67c58beb4fdbab494c5e64c21
I also removed huge blocks of code that were not used (commented out)
If you don’t want to wait, you can pull from the GitHub repo
Looks perfect for what I need, thanks for the hard work.
Any reason you’re aware of that it shouldn’t work if I just update those 4 files? Presume you’re working from nightlies or similar?
Running openhab 2.2 release on openhabian in case that makes a difference.
Thanks again