I would like to be able to insert Media (pictures) as elements in Supertile. Currently only Icons and Labels can be inserted, but not Media.
Hi @Samuli_Jakobsson - welcome to the community and thanks for posting. Can you share more details about the type of media content you are hoping to add to your Super Tile?
eg. a logo, a picture of your family, a camera stream, etc?
Thank you @josh I have been creating some dynamic data badges using shields.io. and imported them to sharptools as pictures in media. There are parking garages in my area that publish number of free parking spaces realtime as json feed. The idea is to put this info on my dashboard so I can check if there is free space and where to park as I head downtown.
Data badge is a wide rectangle in shape and it would be nice to stack several of them into one tile, to save some screen space. Maybe supertile would be a good tool for this if it allowed media?
…or is there another way to get json data and parse a value into supertile somehow? That would of course be even better.
Depending on the data format, you should be able to do that using an HTTP Action in a Rule and then save the resulting value to variable.
If you want to share the URL you’re working with and the field (path) you are trying to extract, I’d be happy to put together an example for you.
Yes, this is the url https://p.hsl.fi/api/v1/facilities/992/utilization and I would like to get the “spacesAvailable” -value out of it
Here’s an example showing how you could make an HTTP call to the endpoint you mentioned and then save the response into a $ParkingSpotsAvailable variable.
You can display that variable in a Super Tile alongside your other content or on its own in a Variable tile.
In my case, I set the trigger to run every day at a set time, but you could also add multiple time triggers in the rule or even set the action on your Super Tile to call this rule directly. That way the data would always be refreshed at a set time every day, but you could also tap on the Super Tile and it would run the rule and refresh the data (eg. tap to refresh).
When setting your Variable, you’ll select the source as ‘Variable’, then when the variable picker comes up, tap the Context Variables tab → Response → HTTP → Response Data. When you’re prompted for which property you want, enter
0.spacesAvailable (since it’s the first item in an array , and
spacesAvailable is the property name).
Thank you so much for help, I tried it and works perfectly
So there is no longer need for adding media in supertiles, in my case!
Is there an easy way to use a media image as a background? I see some really nice images (tesla cars) and was wondering if that can be a background image to a supertile.