Notification to mobile phone arriving delayed once door bell rings

I have a video doorbell “Dahua VTO 2202F”, connected via ethernet cable directly to my switch. It’s integrated into my HA via this integration via HACS: https://github.com/rroller/dahua

I’ve also setup the following automation, sothat I get a notification and snapshot when someone presses the doorbell button:

alias: Dahua VTO Klingel Benachrichtigung aufs Handy
description: ''
trigger:
  - platform: state
    entity_id:
      - binary_sensor.dahua_vto_2202f_klingel_button_pressed
    from: 'off'
    to: 'on'
condition: []
action:
  - service: notify.mobile_app_samsung_s20
    data:
      message: Haustür klingelt!
      data:
        image: /api/camera_proxy/camera.dahua_vto_2202f_klingel_main
        color: red
        channel: Klingel
        ledcolor: red
        vibrationPattern: 1, 1000, 50, 1000, 50, 1000, 50, 1000, 1
        importance: high
        visibility: private
mode: single

Sometimes the notification arrives on my mobile instantly upon button press as it should, sometimes it arrives with a noticeable delay. Sometimes when the door rings, I look at my phone and see no notification, and as soon as I unlock the screen I get the notification. Why could this be happening and how can I debug it to see check where it’s getting stuck?

looks like you are missing the critical notification format, adjust your YAML to include whats mentioend in the first example here:

Without adding ttl and priority the notification will be delayed, this speeds it up.

I’ll try that. Will it work after editing the YAML, or do I have to delete the notification channel and create it again?

this code doesn’t interfere with notification channels, its processed via firebase before it hits your device

I find that this automation behaves strangely sometimes.

When I’m in my home wi-fi, sometimes I get a screenshot in the notification on my mobile from the video doorbell, sometimes I don’t.

When I’m outside my home wi-fi, I get the notification (sometimes quite delayed) but definitely with no screenshot from the camera.

When I tap the notification, the first tab from my HA dashboard opens. Is there a way to open a specific tab in the dashboard instead, or even better just directly open the video feed when the notification is tapped on mobile phone?