I have configured a mail notification when my alarm is being triggered. I have added the time and date to the message. it looks like this:
- id: send_mail_when_alarm_triggered
alias: Send notification when alarm triggered
initial_state: 'on'
trigger:
- platform: state
entity_id: alarm_control_panel.ha_alarm
to: triggered
action:
- service: notify.gmail_notify
data:
title: 'ALARM!!!'
message: "ALARM! The alarm has been triggered at {{ states.sensor.time_date }}!"
But i am receiving this:
ALARM! The alarm has been triggered at <template state sensor.time_date=16:14, 2019-05-15; friendly_name=Time & Date, icon=mdi:calendar-clock @ 2019-05-15T16:14:01.021251+02:00>!