Text on Dashboard tile under program control

Yes, essentially I am looking for a way to set the text inside of a Hubitat Dashboard Tile to an expression in Webcore. Basically, I want a way to dynamically change the tile text under program control. I'm not entirely sure that I can set a text field of a virtual device from webcore, but that is my hope.

I can see this capability as being a very powerful addition to dashboards by providing extended status information in addition to tiles which today are mainly a control point.

Here is a dth

It gives you two attributes var1, var2


It does not seem to set current states like the Virtual Omni sensor.

two arguments to set
var1 or var2
and value

so setVar('var1', 'value')

it is different to allow you to set more than one variable.

I typed in two values this time and clicked the "Set Var" button. Current States is still blank. Any ideas?

First parameter must be either var1 or var2, second parameter is the text string you want to store

Ok, that was subtle. Thanks for pointing that out. So, now the question is, how can I set those parameters via Webcore. I can't seem to access them. I don't want to read them from Webcore. I want to set their values from Webcore.

Works for me....

We have success! Thank you very much to all of you. Here's the piston:

Here is a Test dashboard:

I can really work with this now.

Are the names var1 and var2 standard?

there is 'no standard', except for what you want in the device handler.

Since you have the code, you can change it as you see fit. The rule is attributes need to be defined.

I wanted to give an example if you needed more than 1 variable.

I see that in your driver code now. I have so many irons in the fire in my home automation and SOHO networking that I don't get down in the weeds enough. I have used "parameters" in webcore before, but never really realized how they were working until you boiled it down to a simple example.

I will have to get into learning these driver code bits so I can do more.

I want to thank you and the others responding here for all your awesome help. I transitioned from a SmartThings V1 Hub to HE-7 here two weeks ago. I have everything running, except better than before.

This is such a great community and I am duly impressed with the HE hub and how easy it was to get here. You rock!

Come visit my phpBB sometime at https://community.scottibyte.com/. I do tons of Ubiquiti Unifi and QNAP NAS.

1 Like

Oh snap! This might be just what I need to make a clock without seconds! (The wife asked if I could format the time to remove the seconds. lol)



That's a great way to apply the technology. Do you think there might be a way to control the background color or the tile under program control? I would like a tile like the type we have been talking about to be able to respond to a directive to perhaps keep the same data displayed, but change the background color of the tile itself.

Hi all,
what virtual devise type can i use the driver with?
thanks beau

The Type is "Virtual Attribute set". It's a custom driver code listed above.

hi one question what does the device show up as in webcore

So, you would be creating a device of type "virtual attribute set" from the custom driver. Once you do that and you create the device you gave it a name. Don't forget that you need to go into the Webcore App in HE and authorize the device name to Webcore before Webcore will see it when you edit a piston.

that my question what device type is it webcore