Making a template widget behave like the button widget

Tags: #<Tag:0x00007efec557d080> #<Tag:0x00007efec557cf90> #<Tag:0x00007efec557ce78>

I wonder how I can combine a template widget and a standard button to a widget which is supposed to let me move to another dashboard. After reading a pile of posts, I ended up with a not working template which tries to “inherit” the button behaviour:

<div ng-init='foo = {"type": "button",
                     "action_type": "navigate",
                     "navigate_dashboard": "Luft Innen"}'/>
<widget-button class="btn btn-lg" style="width: 100%; height: 100%" 
<div class="row">
   <div class="col-xs-6"><span><widget-icon iconset="'smarthome-set'" icon="'temperature'" /></span>Temperature</div>
<div class="row">
   <div class="col-xs-6"><span style="font-size: 28pt">{{itemValue('homematic_HmIP_STHD_ccu3_000E9569A5296E_1_ACTUAL_TEMPERATURE')}}°C</span></div>

What’s wrong? I would like to have the template look like the button widget: no shadow or frame rendered when pressing, just button background color becomes brighter.

There is already a built-in solution to your problem

Create an item in openHAB

String Dashboard

In the HABpanel setting panel scroll down on the right hand side and find:

Select the Dashboard item you just created

Now in a Dashboard create a button widget and fill in the fields:
openHAB item with the new Dashboard item you just Created
Command value with the name of the Dashboard you want to navigate to

1 Like