Sensor state value on URL attachament

Hi! It’s possible add the sensor state on the URL of attachment on iOS push notification?

  - service: notify.ios_iphone_alex
    data:
      title: Test
      message: Test motion is {{states.binary_sensor.motion_sensor.state}}
      data:
        attachment:
          url: https://XXXX.duckdns.org/local/test_{{states.binary_sensor.motion_sensor.state}}.jpeg
          content-type: jpeg
          hide-thumbnail: false
        push:
          category: TEST

If the URL is https://XXXX.duckdns.org/local/test_on.jpeg or https://XXXX.duckdns.org/local/test_off.jpeg the attachment show correctly on the iOS push notification.

Thank you!