Ring - Auto open door when ringing specific times specific days

Hi,
I have an intercom that opens the neighborhood door for the 200 neighbors (everyone has their own internal unit, to control one external door), on my intercom I have fitted a ring intercom, so far so good.
I can from home assistant open the door when someone calls, that’s good,

The thing is that I want to automatically open the door after someone calls at the bell, on specific days of the week at specific times

For example
Cleaning service comes on Mondays at 12 am and does have the internal key to access, but not the external door.
Program that every call between 11:45 and 12:05 on Mondays gets automatically opened (after a x seconds buffer time).

Can I get some help with this blueprint, so far GPT not that good! Can’t find one already made, I thought this was a common use case, wasn’t expecting it to not be already done by someone.

Thanks!

blueprint:
  name: Desbloqueo Automático de Puerta con Ring Intercom
  description: >
    Automatiza el desbloqueo de la puerta mediante Ring Intercom basado en eventos, con restricciones de tiempo y día.
  domain: automation
  input:
    ring_event:
      name: Nombre del Evento de Ring
      description: "Nombre del evento generado por Ring Intercom para llamadas entrantes."
      default: "ring_event"
      selector:
        text: {}
    door_unlock_button:
      name: Botón de Desbloqueo de Puerta
      description: "La entidad del botón que desbloquea la puerta."
      selector:
        entity:
          domain: button
    days_of_week:
      name: Días de la Semana
      description: "Selecciona los días en los que esta automatización estará activa."
      default:
        - mon
        - tue
        - wed
        - thu
        - fri
        - sat
        - sun
      selector:
        select:
          mode: list
          multiple: true
          options:
            - mon
            - tue
            - wed
            - thu
            - fri
            - sat
            - sun
    start_time:
      name: Hora de Inicio
      description: "La hora de inicio para la automatización."
      selector:
        time: {}
    end_time:
      name: Hora de Fin
      description: "La hora de fin para la automatización."
      selector:
        time: {}
    delay_before_unlock:
      name: Retraso Antes de Desbloquear
      description: "Tiempo en segundos antes de desbloquear la puerta tras recibir el evento."
      default: 5
      selector:
        number:
          min: 0
          max: 60
          unit_of_measurement: seconds
          mode: slider

trigger:
  - platform: event
    event_type: !input ring_event

condition:
  - condition: time
    after: !input start_time
    before: !input end_time
    weekday: !input days_of_week

action:
  - delay:
      seconds: !input delay_before_unlock
  - service: button.press
    target:
      entity_id: !input door_unlock_button

mode: single

Entities:

I’m using this automation to open the door when an helper “Ring to open” is on and to announce that the door has been opened using Sonos speaker:

alias: Ring to open, apertura
description: ""
triggers:
  - trigger: state
    entity_id:
      - event.front_entrance_ding
conditions:
  - condition: state
    entity_id: input_boolean.ring_to_open
    state: "on"
actions:
  - action: button.press
    metadata: {}
    data: {}
    target:
      entity_id: button.front_entrance_open_door
  - if:
      - condition: state
        entity_id: input_boolean.mute_citofono
        state: "off"
    then:
      - action: media_player.volume_set
        metadata: {}
        data:
          volume_level: 0.4
        target:
          device_id: c9d888c2386da8ce2794a3982c508249
      - action: tts.speak
        metadata: {}
        data:
          cache: true
          media_player_entity_id: media_player.sonos_cucina
          message: Non serve aprire il citofono, mamma o papà in arrivo
        target:
          entity_id: tts.google_it_it
  - delay:
      hours: 0
      minutes: 0
      seconds: 30
      milliseconds: 0
  - action: input_boolean.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: input_boolean.ring_to_open
mode: single

1 Like

Hi A,

Do you get an error?

Are you testing this using run in the editor or with a real physical event?

I have ring installed for my doorbells. I do not see this listed in developer under events. Are you sure that is really an event? (or are you putting something else in there?)

I don’t really understand events coming from witches and binary sensors this is a new thing for me, Also I am having a problem with the automation tuning on any ring event, (there is an event ring creates when ringing, and when opening and it gets into a loop, also there is an event I think after a minute when “las opened” and “last ring”)

blueprint:
  name: Desbloqueo Automático de Puerta con Ring Intercom
  description: >
    Automatiza el desbloqueo de la puerta mediante Ring Intercom basado en eventos, con restricciones de tiempo y día.
  domain: automation
  input:
    ring_event_entity:
      name: Entidad del Telefonillo
      description: "Selecciona la entidad que genera el evento cuando se llama al telefonillo."
      selector:
        entity:
          filter:
          - domain: event
    ring_event:
      name: Tipo de Evento
      description: "Tipo de evento que debe detectar el telefonillo (por ejemplo: 'ding')."
      default: "ding"
      selector:
        text: {}
    door_unlock_button:
      name: Botón de Desbloqueo de Puerta
      description: "Selecciona el botón que desbloquea la puerta."
      selector:
        entity:
          filter:
          - domain: button
    days_of_week:
      name: Días de la Semana
      description: "Selecciona los días en los que esta automatización estará activa."
      default:
        - mon
        - tue
        - wed
        - thu
        - fri
        - sat
        - sun
      selector:
        select:
          mode: list
          multiple: true
          options:
            - mon
            - tue
            - wed
            - thu
            - fri
            - sat
            - sun
    start_time:
      name: Hora de Inicio
      description: "La hora de inicio para la automatización."
      default: "00:00:00"
      selector:
        time: {}
    end_time:
      name: Hora de Fin
      description: "La hora de fin para la automatización."
      default: "23:59:59"
      selector:
        time: {}
    delay_before_unlock:
      name: Retraso Antes de Desbloquear
      description: "Tiempo en segundos antes de desbloquear la puerta tras recibir el evento."
      default: 2
      selector:
        number:
          min: 0
          max: 10
          unit_of_measurement: seconds

trigger:
  - trigger: event
    event_type: state_changed
    event_data:
      entity_id: !input ring_event_entity

condition:
  - condition: state
    entity_id: !input ring_event_entity
    attribute: event_type
    state: !input ring_event
  - condition: time
    after: !input start_time
    before: !input end_time
    weekday: !input days_of_week

action:
  - delay:
      seconds: !input delay_before_unlock
  - action: button.press
    target:
      entity_id: !input door_unlock_button


mode: single