Doorbell button card mimic frontdoor doorbell button

Hi all,

I would like to make button on my dashboard that mimics my frontdoor doorbell that I made like :bell: Frencks 2 dollar doorbell project :bell: But I can’t seem to find a way to do a switch.turn_on when I press the button and a switch.turn_off when i release the button.
So I would like to keep the “ringgg” on when I have my mouse pressed on the button and “ringgg” off when I release the button. Just like my doorbell.

Sounds simple, but could not find the answer to this question. Seems so simple, but could not find a “button release” anywhere.

Regards,
Derk

Create a Lovelace button (e.g. entity button, but there are other options) that runs a script as the tap action.

The script sequence:

  1. turn on your doorbell
  2. stop in a wait template until the button is released
  3. turn off your doorbell.
1 Like

Thx @tom_l,

I now have:

doorbell_state:
  alias: Doorbell State Change
  sequence:
  - service: switch.turn_on
    entity_id: switch.doorbell_chime
  - wait_template: "{{ is_state(entity, 'off') }}"
  - service: switch.turn_off
    entity_id: switch.doorbell_chime

But what entity do I use? I’m talking about this “virtual button” on the lovelace frontend

Can I get the press or release state from a entity-button like below?

type: entity-button
name: Doorbell
tap_action:
  action: call-service
  service: script.turn_on
  service_data:
    entity_id: script.doorbell_state
entity: script.doorbell_state

I seem to be missing something here :slight_smile:

No I don’t think you are. I didn’t think that through very well. I don’t think you can get the state of the entity-button.

1 Like