Can't get icon to work with Android TV notification

2021.12 introduced an icon option for Android TV notifications. When I test the service in developer tools, it works as expected. When I try using it in a service call in a script, I get the error:

Error executing script. Invalid data for call_service at pos 3: extra keys not allowed @ data['icon']

My sequence looks like:

    - service: notify.shield
      data_template:
        message: "{{message}}"
        icon: 
          url: "https://ih8gates.dyndns.org/local/deedee.png"

Using “color” in the data fails the same way.

Anyone spot what I did wrong?

Ah. Figured it out. Leaving this hear should anyone else run into the same issue. The extra keys get passed in another data key. Like:

    - service: notify.shield
      data_template:
        message: "{{message}}"
        data:
          icon: 
            url: "https://ih8gates.dyndns.org/local/deedee.png"
1 Like

This helped me some years later lol thanks!