Support for Variables in Media Tiles

My particular use case for this requirement is probably not as widespread in this forum BUT, I think it opens up a world of possibilities for dashboards. I’ll start with a couple of screen-shots so I can explain my scenario - together with a link to a thread where I discuss the issue in detail.

In Rule Manager, I have created a string variable called albumArtUri and this is populated from a device attribute in Hubitat. In this case, it’s querying album art for Sonos from a custom driver (as Hubitat doesn’t expose it to SharpTools natively).

Screen Shot 2021-01-30 at 7.30.46 AM

So with the albumArtUri being automatically populated now, I would like the ability to create a media tile to display the contents of this variable as shown below:

Screen Shot 2021-01-30 at 7.30.05 AM

The idea here is when the value of the albumArtUri variable changes, so does the image displayed in the media tile. It sounds redundant because SharpTools has a media tile feature already but as I said, the Sonos/Hubitat integration doesn’t expose the album art like SmartThings does.

Taking this one stage further. Again taking an example from my own setup. If you look at the dashboard below which is primarily Sonos driven, I have 20x station presets. These are media tiles with static images on them that point to a web host via some http URL. One of my long time goals is to have the button that represents the station being played to change color to show it’s been selected.

So if I pressed the button for Vinyl Classic Rock, the button would change to a dark blue (as a simple example) but keep the image for the station. Because buttons don’t have an on/off state, it’s not possible to set an active status as you can with a switch. But you could achieve something similar for a station that’s playing; a variable called VinylClassicRock could be entered for the media tile and the value for it controlled with logic. Like, if the Office Sonos is playing Vinyl Classic Rock, change the value of the Vinyl Classic Rock variable to “”. Otherwise, when it’s NOT playing, point the variable to “”.

Excellent write-up, description, and examples! I cast a vote as I could see other cool use-cases enabled by this. I don’t have anything specific in mind, but since this would enable the ability to dynamically change media from rules, it provides a lot of flexibility.

Piggybacking on your active radio station idea, it could be used to reflect the status of a device or an aggregated status of multiple devices. And since it’s powered by the Rule Engine, it could be more than binary states… it could really be any number of states - for example, having an image of your house on your dashboard that changes with the weather.

Edit: Don’t forget to scroll to the top of the post and cast a vote yourself! :smiley: