New Trigger moisture.detected - trigger.to_state.name

I am trying to utilize the new automation format and trigger in 2026.08 release for moisture.detected for all of my water sensors on a new install of HA. I want the message to include the name of the sensor. It does not appear to function or work correctly like when I used entities and the old format with old automation style.

message: “LOCATION Alert - Water Detected: {{ trigger.to_state.name }}” ← fails to find trigger state name.

Also seems IOS Critical alerts would not work without using the yaml editor and older action format but that’s a smaller issue.

alias: Water - Water Detected Mobile Notification
description: ''
triggers:
  - trigger: moisture.detected
    target:
      entity_id:
        - binary_sensor.basement_drain_water_sensor
        - binary_sensor.hall_bathroom_water_sensor
        - binary_sensor.kitchen_sink_water_sensor
        - binary_sensor.laundry_water_sensor
        - binary_sensor.master_bathroom_water_sensor
        - binary_sensor.refrigerator_water_sensor
    options:
      for: '00:00:00'
      behavior: each
conditions:
  - condition: switch.is_off
    target:
      entity_id: input_boolean.disable_water_sensors
    options:
      behavior: any
      for: '00:00:00'
actions:
  - action: notify.mobile_app_matt_iphone
    data:
      title: Water Alert
      message: LOCATION Alert - Water Detected!
      data:
        push:
          sound:
            name: default
            critical: 1
            volume: 1
mode: single

The new purpose-specific triggers do not provide the exact same schema for the trigger variable as the State trigger. To get the entity name use:

{{trigger.entity_id | entity_name}}

For mobile app notifications with extended data, you do need to use the old notify action, but you can do it in the UI. Though, for critical notifications you do have to use YAML structure for the value in the UI field:

Thank you! Will update to this syntax! Worked perfect. Changed a water sensor state to on, in the Developer tools (tools) section and validated notification. Thanks again!