Unifi Protect Door bell event issue

Hello everyone.
I’m using since few weeks Unifi Protect integration and thanks for this feature.

But I’m facing to a strange behaviour with usage of ring button on G4 Doorbell…

I used the automation to send to me a notification and I used the example on documentation.
But when I restart the G4 Doorbell I receive 2 notifications (when stop and when restart), not only when someone push the button to ring.
Do you have an idea why ?
I suppose I made a mistake in my code but I don’t see where.
Thanks for your help.

alias: Sonnerie porte
description: ""
triggers:
  - event_type: state_changed
    event_data:
      entity_id: event.g4_doorbell_pro_doorbell
    trigger: event
conditions:
  - condition: template
    value_template: |
      {{ 'ring' in trigger.event.data.new_state.attributes.event_types }}
actions:
  - action: tts.speak
    data:
      cache: true
      media_player_entity_id: media_player.bureau_tab
      language: fr
      message: Quelqu'un sonne
    target:
      entity_id: tts.google_translate_en_com
…..

I think you’re using the wrong characters to mark preformatted text. It should be three backticks (on English keyboards to the left of the 1 key), not inverted commas. You can also use the </> option in the cogwheel toolbar.

Hi Thanks a lot :slight_smile:
I found it iin french keyboard it’s ALTGR-7

Hello.

I found a solution, not the best but at the moment it works.

alias: Sonnerie porte
description: ""
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.g4_doorbell_pro_doorbell
    to: "on"
conditions: []
actions:
  - action: tts.speak

If you have a better idea because I think it’s better to manage Ring info but I can’t do it.
Thanks.