Automation with template trigger not working

Hi all,

Question: I created a custom sensor component for Belgian waste collection. The sensor works fine and I now want to create an automation to show a persistent notification. However, for some reason it is not triggered. I defined my automation as below:

  - alias: Show restafaval notification
    trigger:
      platform: template
      value_template: "{{ is_state_attr('sensor.ophaalkalender_restafval', 'Pickup state', 'on') }}"
    action:
      service: persistent_notification.create
      data:
        data:
        title: "Restafval"
        message: "De vuilbak moet buiten"
        notification_id: restafval  

If I test the template using the dev-template in homeassistant it returns true. Any idea why it is not triggering?

Too many data: statements. Try:

    action:
      service: persistent_notification.create
      data:
        title: "Restafval"
        message: "De vuilbak moet buiten"
        notification_id: restafval  

Oh my god… I must have had a brainfart :roll_eyes:.

Thanks for the swift reply.