Kodi Notifications with custom icon

I’m trying to use the Hass logo as custom icon for Kodi notifications. The component page for Kodi states:

Kodi comes with 3 default icons: info, warning and error, an URL to an image is also valid. Defaults to info

I’ve downloaded an image of the homeassistant logo and saved it to www/icons/hasslogo.png. My notification is properly working but the custom icon does not appear. Resizing the image to a smaller size didn’t work either.

I’ve tried to specify the url to the image like this:

- service: notify.kodi
  data:
    title: "Home Assistant"
    message: "Restarting Dasher."
    data:
      displaytime: 5000
      icon: /local/icons/hasslogo.png

and also like this:

- service: notify.kodi
  data:
    title: "Home Assistant"
    message: "Restarting Dasher."
    data:
      displaytime: 5000
      icon: "/local/icons/hasslogo.png"

Both ways do not work. Can anybody help?

Hello, did you manage to show the Hass Icon?

I Got it working,
you actually have to put the whole url of the icon for it to work.

icon: ‘https://hass.your.ip/local/hass-fav-icon.png

1 Like

Late answer but glad you found a solution! I got it to work too but I’m having trouble using the icons in data_templates. For example:

  - service: notify.kodi
    data_template:
      title: Homeassistant
      message: >
        {% if is_state("input_select.raspiapp", "Restart Homeassistant") %} Homeassistant wird neu gestartet.
        {% elif is_state("input_select.raspiapp", "Restart Dasher") %} Dasher wird neu gestartet.
        {% elif is_state("input_select.raspiapp", "Reboot Pi") %} Raspberry Pi wird neu gestartet.
        {% elif is_state("input_select.raspiapp", "Shutdown Pi") %} Raspberry Pi wird heruntergefahren.
        {% endif %}
      data:
        icon: "http://IP:8123/local/hasslogo.jpg"

This does not work whereas it works perfectly fine in a situation without a template. Where do I have to place the icon part of the script in templates? Can anyone help?

UPDATE:
It’s actually quite easy. I did not need a data_template in this case although the automation worked fine with it. This is the solution:

  - service: notify.kodi
    data:
      title: Homeassistant
      message: >
        {% if is_state("input_select.raspiapp", "Restart Homeassistant") %} Homeassistant wird neu gestartet.
        {% elif is_state("input_select.raspiapp", "Restart Dasher") %} Dasher wird neu gestartet.
        {% elif is_state("input_select.raspiapp", "Reboot Pi") %} Raspberry Pi wird neu gestartet.
        {% elif is_state("input_select.raspiapp", "Shutdown Pi") %} Raspberry Pi wird heruntergefahren.
        {% endif %}
      data:
        icon: "http://IP:8123/local/hasslogo.jpg"