Why is {{ trigger.id }} not working in this automation?

alias: Alert - CPU too warm
description: ''
trigger:
  - platform: numeric_state
    entity_id: sensor.processor_temperature
    above: '40'
    id: CPU Temperature
condition: []
action:
  - service: notify.persistent_notification
    data:
      message: |
        {{ trigger.id }} is {{ states("sensor.processor_temperature") }} C
      title: Warning

image

You have manually triggered the automation and thus there is no trigger id. You can tell because the automation would only run IF the temperature was above 40C and it’s obviously not in the notification. The name will however be printed when it does actually run because the temperature has exceeded 40C

1 Like

Duh! I should know better!!

Thanks for bringing me to me senses!

1 Like

image

1 Like