Can't get notification vibrationPattern to work on Android

I had this working last week but needed to restore to a backup that didn’t have this in there. Now that I’ve rewritten it I can’t get a vibration to accompany any of my notifications. I’ve cleared both cache and data for the app on my phone, which I believe clears channels - but even assigning new unique channels hasn’t changed the outcome. I’m sure I’m getting something mixed up but I think I’ve been staring at it too long and can’t see the obvious. :smile: Can someone please tell me what I’m doing wrong here?

Here’s the full automation that results in a silent notification that I only see once I’ve opened up the lockscreen:

alias: MQTT bin Reminder
description: ''
trigger:
  - platform: mqtt
    topic: trash
    payload: go
condition: []
action:
  - service: notify.mobile_app_sm_g973u1
    data:
      message: Don't Forget to take the bins to the curb!
      title: Trash day is tomorrow
      data:
        ttl: 0
        priority: high
        vibrationPattern: 25, 25
        channel: trashday
mode: single

Then I tried to play with it in developer tools… same outcome with this:

service: notify.mobile_app_sm_g973u1
data:
  message: Test
  title: Test
  data:
    vibrationPattern: '100'
    channel: why

Help?

Didn’t solve this exact problem but found a workaround on another thread!

For anybody landing in this topic, have a look to the following. It might save you a couple of hours of wondering why it doesn’t work: Introduction | Home Assistant Companion Docs (it links to a specific warning section of the page)

There are a few notification parameters that can only be set the first time a notification channel is created and cannot be changed once created. Vibration pattern is one of them. Change the notification channel in order to see any changes you make to the pattern. This is also mentioned in the docs.

Despite creating a new channel every time I try out a different vibration pattern my phone always makes the same pattern. It seems that this setting is device dependant. I have a OnePlus 8T.

FWIW if I go the notifications settings on my phone there is a just a vibrate toggle for each Channel (aka Category on my phone) that I’ve created, I’ve never paid attention to this setting before on previous phones that I’ve owned so perhaps this setting on my phone is a clue that I can’t set channel based vibration patterns? :cry:

try checking the logs when you create a new channel with the command, its possible that it may not be formatted as expected and it goes to the default as well.

Settings > Companion App > Troubleshooting > Show and share logs

Its also possible its blocked on the device as we have seen similar issues with other manufacturers.

the vibration toggle you refer to is also visible on my Pixel on a per channel basis but tis only to turn it on and off.

This is what I can see in the logs:

11-30 07:05:30.298  6799  6799 D MessagingService: Creating notification with following data: {webhook_id=a361d3dd60948152abedb1817ac9742189f8cac633734f51eb69b2845cb87291, channel=testingv20, vibrationPattern=100,4000,100,4000,100,4000, message=Message, server_id=1}
11-30 07:05:30.310  6799  6799 D MessagingService: Show notification with tag "null" and id "520881080"

I’ve tried placing the pattern in single quotes and double quotes but see the same outcome in the logs.