Is there a way to get a timestamp in an IOS notification?

As per title, I’ve Googled it but the few things I’ve tried haven’t worked.

I have it set so that when my doorbell is pressed it sends me a notification, I’d like to get a timestamp in there (HH:MM ideally) - “Doorbell rang at 10:54” etc.

But I can’t work out how to get it to work.

Is there a defined way of doing this?

Thanks.

here’s an html5 example

action:
  - service: notify.html5
    data_template:
      title: "Home Assistant"
      message: "The doorbell rang at {{ states('sensor.time') }}"
1 Like

Thanks, I had tried that (without the ’ ’ ) and it failed, just tried again with them but it’s not displaying the time, it just says: “Doorbell rang at unknown

Do I need to define a sensor for time first?

yes.

- platform: time_date
  display_options:
    - 'time'
    - 'date'
    - 'date_time'
    - 'time_date'
    - 'time_utc'
    - 'beat'
1 Like

Perfect, tested and it works - thank you!

:thumbsup: