Nofication with Timestamp

Hi all,

i’m just trying out to receive a notification with Time and Text. The code works only with the time after the text.

Works:

service: notify.mobile_app_xxx
data:
  message: SomeText. - {{ now().hour }}{{ ":" }}{{ now().minute }} Uhr
  title: SomeTitle
  data:
    tag: rain-detected

Don’t work:

service: notify.mobile_app_xxx
data:
  message: {{ now().hour }}{{ ":" }}{{ now().minute }} Uhr - SomeText.
  title: SomeTitle 
  data:
    tag: rain-detected

Can someone help me?

best regards
Philipp

Try like this

data:
  message: "{{ now().hour|string ~ ':' ~ now().minute|string ~ 'Uhr - SomeText.'}}"

The Script works, but the time displayed now ‘11:2 Uhr’?

{{ now()|as_timestamp|timestamp_custom('%H:%M') ~ 'Uhr - SomeText'}}