Date Tiles, Momentary Tile, and Hyperlink REST API updates

We’re excited to announce the next SharpTools.io release! This update brings with it the following enhancements:

  • Day of Month Tile
  • Date Tile
  • Option for changing the time format in the Clock tile
  • Momentary Tile
  • headers support in Hyperlink REST API syntax

Day of Month Tile

Simple tile for displaying the current day of month in a large, easy-to-read format.

image

Date Tile

Like the Clock tile, but for dates! Displays the date:

image

By default, it uses the date format implied by your system locale settings, but the tile also has options for specifying a specific date format:

image

Clock Tile - Time Format option

Like the new Date tile, the Clock tile automatically infers the time format based on your system’s locale settings. We had a few requests from people who wanted to display their dashboard clocks in a different format than their system time format, so we’ve added the option to explicitly use 24 hour time or 12 hour time (AM/PM):

image

Momentary Tile

This new tile brings support for Things which implement the ‘Momentary’ capability which has a single push() command. This is convenient where you want to trigger an action or automation within your system without keeping track of any ‘state’.

image

If you’re already using something like the Momentary Button Tile which supports both Switch and Momentary capabilities, make sure to change over to the new format.

headers support in Hyperlink REST API Syntax

The Hyperlink REST API syntax now supports an optional configuration object which supports passing in a set of headers to include in your REST API call.

$.get(url, config)
$.post(url, data, config)
$.put(url, data, config)
$.delete(url, config)

This means you could include custom headers needed by your API:

$.post("https://mycoolapi.com/update", {}, {"headers": { "X-Species": "Ferengi"}})

Note that you’ll need to pass an empty data object {} for the post and put calls if you don’t have any payload.

2 Likes

Nice update! I was able to use this to run a SmartThings Scene. I used the format:

$.post("https://api.smartthings.com/v1/scenes/REPLACE_SCENE_ID/execute", {}, {"headers": { "Authorization": "Bearer REPLACE_WITH_TOKEN"}})

I got the token from the personal access tokens page:
https://account.smartthings.com/tokens

And I found the scene ID from the List Scenes page when viewing the location in the SmartThings IDE. I played with the API and you can get it that way too, but I found that looking it up in the IDE was easier.

1 Like

The Day of Month tile is the finishing touch to this dashboard. Thanks!

3 Likes

Any plans to adjust both the top bar and bottom potion on the day of the month tile. I can set the top color and make it transparent but can’t change the color of the bottom portion

Are you referring to how the white part of the Day of Month is always white?

What if we added a simple DD format to the Date Tile? It’s not quite the same thing as it wouldn’t show the month in the header, but perhaps it would work if the primary goal is to see the day of the month.

Or if the goal is seeing both the day of month and the month, one of the existing bottom two formats in the Date tile might work for you?

image

I like the 2 colors. Would just like to have the option to make the bottom white transparent like the top. It looks odd as it stands out since everything else is transparent on the dashboard

This may lose it’s importance once the world gets back to normal, but I was really hoping I could turn this into a big “Friday” tile :D. I know that day of the week can be a secondary line for the Date tile but I find all secondary lines on all tile way too small to read.

1 Like

Maybe we can add a checkbox in the Day of Month tile’s settings to use a semi-transparent background.

image

image

If you’re looking for a fully transparent solution, then I would recommend sticking with the Date tile and using the newly added format (‘D’) or the format shown in my post above.

Adding a day of week format (‘dddd’) to the Date tile should be fairly straightforward:

2020-04-24_10-27-56

image

I’ll see if we can get it included in a future release. :smiley:

3 Likes

Josh - that would work

Both of these features are now available in beta.

1 Like

Josh how would I add a momentary button tile? I’m a ST user and tried adding a regular switch, and looked for this layout but it wasn’t there. Do I need a specific thing type in ST? Or is this a Hubitat only feature?

Yes, it requires a specific device type that implements the Momentary capability. For example, the Momentary Button Tile device handler in SmartThings.

Depending on what you are trying to accomplish, there may be other approaches too. For example, a common approach is to create a SharpTools Rule to run your desired actions and then add that to your dashboard - as it also acts like a stateless tile that you can tap to run an action.

2 Likes

Are momentary tiles supported for Hubitat? I tried to add one that is of a custom device driver I created, but the Hubitat interface still does not show it as an available device.

Thanks!

**EDIT: I was able to get my momentary device working by adding the “actuator” capability to the driver **

1 Like