[Labs] Custom widgets

Hi.

The same result here: “undefined” in web editor and NULL on LCD.

And is there any way how to call HASS script on icon tap? In onAction() section.

Hello people! I feel like I maxed out my dashboards using Homehabit, and wanted to try creating a couple of new widgets without any luck. Would you mind answering some questions before I spend eternity and some plus hours so I know what is and isn’t doable?!

First and foremost I’d like to create a Homekit-like scene button, like this one:

  • Can I make a widget half the size of a regular widget in height?
  • Can I put the icon and name onto one line?
  • I’d like to use a script from HA in place so can I use an action type widget, but highlight it until the script runs?

Thank you in advance!
Daniel

Hi,
I think I have the same problem.

Here is my widget code:

export default class extends HTMLElement {
  render() {    
    const temp = this.state['1qjf7bcvuny7k1sv4771h3wphu.WS_Outdoor_Temperature#number-value.state'];   
    return `     
      <span class="label">${temp}</span>
    `;
  }  
}

Widget in editor:
image

Widget in app:
image

How can I get the state of an openHAB item?

@Attila_Abert Custom widgets development is currently on hold. Next-gen dashboards will not support these custom widgets as is. It is not decided at the moment if there would be a need to HTML-based custom widgets at all with the next-gen dashboards or there is a better way to provide that functionality.

1 Like