Changing attribute of a switch from ON/OFF to any other word on the dashboard


I have a heating system where I have the status of the boiler, burner and the pump connected to small light bulbs. Boiler ON, Boiler Fault, Burner ON, Burner Fault, Pump ON and Pump Fault. These uses Vac each coming from the heating system.

I am using three two channel zigbee switches with S1 and S2 sensing contact to simulate the status of these signals to hubitat.

for example: the Vac of the boiler ON is connected to S1, the Boiler fault is connected to S2. So when i turn on the boiler the first channel of the switch will turn on. when a fault happens the second channel will be turned on.

On Hubitat I have created these three devices and i am using the switch attribute to show the status of these devices.

I have a challenge:
How can I change the ON/OFF in the switch attribute to a different word like Running or Fault. I am using Attribute because you cannot change the status of the switch when you press it on the dashboard. I want the switch to act like a status indicators only.

Is there a way to do that.

I have tried Tile Master 2 but I cannot use any words I want.

Any Ideas?

thank you

There's probably other easier ways, but I think this will work for sure:

  1. Create a virtual device with the attribute you need. Eg. it could be DeviceStatus with running = on and fault = off.
  2. Create an automation that sets the appropriate attribute based on the on/off setting of the real device.
  3. Use the virtual device in your Dashboard. Create a tile to display the attribute "DeviceStatus".

Hope this helps!

1 Like

Thank you Aaiyar,

If i create a virtual device, what type should I select from the virtual device ?

Sorry I am not being able to follow the first step.

Ah. You have to create your own virtual device driver. There’s many examples in the community and on Hubitat’s GitHub.

You should be able to do it with some CSS, if you can't get something else to work

Thank you Sburke781

I am not a programmer but i can follow logical steps. do you have examples to change the words displayed in a tile using css

Give me a moment....

Trying to beat @sburke781 :stuck_out_tongue_closed_eyes:

Tile Still Open/All closed


#tile-51 .tile-primary>div {
visibility: hidden;
position: relative;
#tile-51 .tile-primary>div:after {
position: absolute;
width: 100%;
visibility: visible !important;
font-size: 1rem;

#tile-51 .tile-primary.on>div:after {
content: 'Still Open';
color: #ab1a34;

#tile-51>div:after {
content : 'All Closed';
color: #7d7a7b;



thank you let me try it :slight_smile:

Well done, was lost in template setups for temp / humidity, which don't include text manipulation. My brain hasn't woken up yet.... :slight_smile:

Thanks navat604

i tried it. it did not work. I also toggles the switch to see if it will change the words when the state changes but it said "on" instead of "Stopped".

here what i put in the css for tile 41 which is the boiler status

Hi Sbueke781.

the above tiles are the attribute of switches as i have mentioned above. I am using two channel zigbee switch for the boiler, burner and pump.

I was asking more about whether the CSS @Navat604 provided acted on the elements that would be present on an attribute tile, which I then worked out were correct.

Sorry, that css is for on/off switch and not for attribute. I am stepping aside for CSS guru @sburke781 or others. Attribute is way above my skill.

Hmm... I thought it looked ok, let me play with it some more...

While you are waiting, try removing the ">div" from some of the CSS you tried earlier...

the word on or off disappeared from the tile.


That's good, did you remove it from the CSS where you are setting the Running and Fault text as well?

I have removed it from the css.

here is my css

This might not be as easy as I thought originally. Other templates, like a switch, give us a "hook" we can look for that includes the on / off state. That's not the case with the attribute template.

Download the Hubitat app