Doorbell housing for Home Assistant ESPHome, to suit Momentary Reset Short Metal Push Button
11
22
0
434
updated May 3, 2022

Description

PDF

This doorbell housing fits a 30mm Momentary Reset Short Metal Push Button such as the one I used from this AliExpress link. Print the model face down and then apply multiple coats of spray paint for weather resilience. Wire the button using some cable (I used some CAT5e), then run it to the microcontroller of your choice, I used a Wemos D1 Mini and ESPHome. See sample code below:

switch:
  - platform: gpio
    pin: D4
    id: light
    name: "${friendly_name} Light"
    restore_mode: ALWAYS_ON
    internal: true

binary_sensor:
  - platform: gpio
    id: bin
    icon: mdi:radiobox-marked
    name: "${friendly_name} Button"
    #device_class: garage_door
    pin:
      number: D3
      inverted: true
      mode: INPUT_PULLUP
    filters:
      - delayed_off: 30s
    # automation when button is pressed
    on_press:
      - repeat:
          count: 15
          then:
            - switch.turn_off: light
            - delay: 50ms
            - switch.turn_on: light
      - switch.turn_off: light
    on_release:
      then:
        - switch.turn_on: light

Model origin

The author hasn't provided the model origin yet.

License