Just playing around with notifications and noticed on Android Notify.device has a Chronometer which can count up or down from a given timestamp. Pretty cool for time sensitive notifications.
In Developer Tools: the following gives me a nice count up timer against the notification.
message: '<b>The Mailbox has been opened</b>'
title: '<b>Mailbox Alert</b>'
data:
color: 'red'
channel: 'Mailbox'
importance: high
icon_url: "https://raw.githubusercontent.com/djhampson/djhHass/master/mailbox.png?raw=true"
chronometer: true
when: '1609572077'
tag: 1
However, to get it to work as part of an automation I need to update the when: tag with a template.
In Developer Tools, the following gives me a UNIX timestamp which is valid.
{{ as_timestamp(now()) | round(0) }}
But when I put it into my automation like so, it doesn’t work. The notification is displayed on my phone but the Chronometer isn’t there.
Note this will count down for 15 seconds and then start counting up. if you don’t want this (say you want it show timer expired when it gets to 0) you’ll need your automation to wait 15secs, cancel this notification and replace it with another that says Timer Expired.