HA Automation not reacting to triggers from Ring doorbell

Hello everyone - I have a fairly vanilla HA setup and my Ring devices (a Ring doorbell and a Chime ringer) were detected automatically during setup. So far, so good. There is an automation built onto the ‘Ring became occupied’ event but this is only triggered about half the time someone rings the doorbell. In my tests the ‘Run actions’ button trigger the events every time, and the Chime responds every time too. I am pretty certain that Ring’s API, which I know is not officially supported, is simply not bothering to pass the events through reliably.

Anyone have any ideas what can be done to make these events pass from Ring more often? Thanks in advance.

Alright - I did some digging. It seems the Ring is working fine and the separate Chime ringer reacts most of the time too, or at least as well as it ever does to Doorbell events. HA is getting notified of every doorbell event - I can see this on the overview page. This indicates that Ring is working. When I run the automation events manually - publish to MQTT - they work every time too

So it seems the HA automation that links the event to the action is not working well. It is actually HA automation that is not working, which seems pretty surprising. It is running on a Raspberry Pi 4, 4GB, version 2021.5.3

This is the whole of automation.yaml

- id: '1620824350897'
  alias: Open Gate on Ding
  description: Open the gate when the doorbell is rung
  trigger:
  - type: occupied
    platform: device
    device_id: 42ea5700be58bf7d142fc711c4bb3384
    entity_id: binary_sensor.front_gate_ding
    domain: binary_sensor
  condition: []
  action:
  - service: mqtt.publish
    data:
      topic: frontgate/release
      payload: '1'
  mode: single

Anyone have any ideas what is going wrong? I’ll try the update and hope…