Using Hue temperature sensor value in an automation

I have a Hue external motion sensor which has a temperature sensor.

I have an automation which is basically
When time = 07:00
if temp < 5 then send a notification to my iPhone

Here is the YAML and it works.

alias: Temp msg for phone
description: ''
trigger:
  - platform: time
    at: '07:00'
condition:
  - type: is_temperature
    condition: device
    device_id: 85a46df9f51c0065ba45df0f1bb220c2
    entity_id: sensor.hue_outdoor_motion_sensor_1_temperature
    domain: sensor
    below: 5
action:
  - service: notify.mobile_app_rix_iphone11
    data:
      message: Below 5 degrees
      title: Outside temp
mode: single

I know that the sensor reports its actual temperature to HA so I was wondering if I could modify the automation it so that the Notification message included the measured/actual temperature.

I found a similar automation here
https://community.home-assistant.io/t/notify-when-temperature-crosses-specific-value/92893
with an answer by anon43302295
So I modified the YAML as shown below.
Unfortunately it doesn’t work.
When I look at “Trace timeline” I get

Stopped because an error was encountered at 9 January 2022, 07:00:02 (runtime: 0.02 seconds)
template value should be a string for dictionary value @ data['message']

I have been through the forum and the blueprints but not found why this doesn’t work (or what should be in this line of YAML.
Any suggestions gratefully received
Thank you.

alias: Temp msg for phone
# https://community.home-assistant.io/t/notify-when-temperature-crosses-specific-value/92893
description: ''
trigger:
  - platform: time
    at: '07:00'
condition:
  - type: is_temperature
    condition: device
    device_id: 85a46df9f51c0065ba45df0f1bb220c2
    entity_id: sensor.hue_outdoor_motion_sensor_1_temperature
    domain: sensor
    below: 5
action:
  - service: notify.mobile_app_rix_iphone11
    data_template:
      message: {{ states('sensor.hue_outdoor_motion_sensor_1_temperature') }}
      title: Outside temp
mode: single

Your template needs double quotes since it is on a single line.

Thanks for your prompt (and perfect) reply.
That now works.
I could have sworn I tried that earlier… :crazy_face: