Mobile notification icon not showing up

I’m experimenting with icon_url for notifications.

It doesn’t seem to work: I’ve refreshed my app so that it syncs with the server and also added e.g. a dummy action (not included below) just as a change to ensure the config did sync. The default HA icon remains, instead of the one I set.

    - service: notify.mobile_app_ceres
      data:
        title: "Batteries"
        message: >
          {%- set batteries = states.sensor
                                | selectattr('attributes.monitor','eq',True)
                                | selectattr('attributes.device_class','eq','battery')
                                | map(attribute='entity_id')
          %}
          The following devices have less than {{ threshold }}% charge:
          {%- for b in batteries %}
            {%- if states(b) | int < threshold %}
           - {{ state_attr(b, 'friendly_name') | replace(' Battery', '') }}: {{ states(b) | int }}%
            {%- endif -%}
          {%- endfor %}
        data:
          group: "batteries"
          url: homeassistant://navigate/lovelace/devices
          icon_url: "https://github.com/home-assistant/assets/blob/9b782fe562cbd4e6139f9be17d8e7befafa5f945/logo/logo-small.png?raw=true"

The icon_url in the current docs uses a broken link. I’ve submitted a PR for that.

I’m using iOS. I couldn’t find anything in the docs that states that it only works for a specific platform. Otherwise, there are surprisingly few hits on the forum for issues about this. Either I’m missing something very obvious, or almost nobody is using this feature.

1 Like

Go back to the docs and keep reading, your using the incorrect parameter.

Thanks, but I’m not seeing what you’re alluding to.

Here is what I’ve considered:

I’m not using both an image and icon here (and it applies only to Android).

Notification Status Bar Icon – only applies to Android. Also, I know MDI doesn’t (yet) work for iOS and that SFSymbols should be used (and these are used in actions).

The iOS/macOS Specific only refers to badges and sounds – neither of which I’m using here.

Presentation Options isn’t relevant either.

Can you be more specific as to what I’ve missed?

sorry totally missed the part about you being on iOS :man_facepalming: the feature you are looking at is android only, the docs do a good job of calling stuff like this out. I saw you attempted to use icon_url but thats for a different icon in android notification.

No worries. That particular section then needs an Android indicator. I’ll submit a PR.

that entire section has the android logo :wink: See where “Notification Icon” is?

1 Like

Indeed… You’re right. Thank you. I did indeed miss that.

2 Likes

I also didn’t see the Android-only thing at first because it’s a page that contains a lot of text, which to me makes it hard to find what’s relevant in general, especially, because I was just trying to quickly skim it, like I do with every page. I think what might work better here is if the vertical menus were both on the left side so that it’s clear that the one on the right is actually a summary for the page. Something made me ignore the panel on the right. I don’t know if it was me expecting a page summary on the left side next to the other menu or me expecting this part of the page to contain irrelevant information, due to my experiences with other websites. But something made me ignore this part.

@parautenbach

You can use
image: "/local/Google_Tasks.png"
on iOS and it will essentially do the same as setting an icon on Android. You won’t be able to set the app icon but the image you use here will be shown on the right side of the notification.