Why now() doesn't work?

I make a automation to say time hourly. but it doesn’t work.

data:
  entity_id: media_player.android
  message: 'The time is {{ now().hour}}'
service: tts.baidu_say

the media player will say “'The time is now hour”,it looks like the template is not rendered correctly

thank you for your time.

You need to use data_template instead of data.

1 Like