Change color of dashboard switch based on contact

I have a switch tile in my dashboard to open/close my garage door:
Garage door tile
It is a momentary switch. The tile changes color momentarily. I also have a contact on the garage door. I would like to change the color of the tile based on the status of the contact. How can I do that?

You won’t be able to do this with a momentary switch alone since it only has a couple states that can be used to indicate a color on the dashboard. What you’ll need to do is combine your momentary switch and contact sensor into an actual garage door virtual device, and then that will allow the different states of the garage door to indicate different colors. I use this one:

Another option would be to write your own rule to update the status of a virtual garage door device based on your contact sensor status and then display that on the dashboard.

2 Likes

Thanks,

I will try that.