Skip to content

Customization

Explore various examples to customize and extend the Doorman firmware. From adding custom sensors to tweaking automation settings, these examples help you tailor the device to your specific needs. Follow the guides to unlock full flexibility and make the most of your setup.

Create a simple TC Telegram Binary Sensor

You can easily add custom binary sensors for any TC Telegram, in addition to the preconfigured ones. This allows you to listen for and respond to any other bus telegram, expanding the functionality of your system.

yaml
# Doorman Standard Firmware (Home Assistant)
# Base Board DOORMAN-S3-REV2

# You can change a few options here.
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"
  ap_password: "Op3n-Sesame!"
  # DO NOT CHANGE - INTERNALLY USED
  branch: "dev"
  firmware_type: "standard"
  api_variant: "ha"
  host_platform: "doorman-s3-rev2"

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

packages:
  host: github://azoninc/doorman/firmware/packages/host/${host_platform}.yaml@${branch}
  rgb_status_led: github://azoninc/doorman/firmware/packages/common/rgb-status-led.yaml@${branch}
  solid_state_relay: github://azoninc/doorman/firmware/packages/common/relay.yaml@${branch}
  extension_board: github://azoninc/doorman/firmware/packages/extension_boards/common.yaml@${branch}
  external_components: github://azoninc/doorman/firmware/packages/common/external-components.yaml@${branch}
  base: github://azoninc/doorman/firmware/packages/common/base.yaml@${branch}
  wifi: github://azoninc/doorman/firmware/packages/common/wifi.yaml@${branch}
  wifi_psram: github://azoninc/doorman/firmware/packages/common/wifi.psram.yaml@${branch}
  ota_esphome: github://azoninc/doorman/firmware/packages/ota/esphome.yaml@${branch}
  api: github://azoninc/doorman/firmware/packages/api/homeassistant.yaml@${branch}
  debug_utilities: github://azoninc/doorman/firmware/packages/debug/debug-utilities.yaml@${branch}
  debug_component: github://azoninc/doorman/firmware/packages/debug/debug-component.yaml@${branch}
  pattern_events: github://azoninc/doorman/firmware/packages/pattern_events/pattern-events.yaml@${branch}
  ring_to_open: github://azoninc/doorman/firmware/packages/ring_to_open/ring-to-open.yaml@${branch}
  indoor_station_settings: github://azoninc/doorman/firmware/packages/bus_devices/indoor-station-settings.yaml@${branch}
  interactive_setup: github://azoninc/doorman/firmware/packages/bus_devices/interactive-setup.yaml@${branch}

binary_sensor: 
  - platform: tc_bus
    name: "Custom Telegram"
    type: open_door
    address: 0
    web_server: 
      sorting_group_id: sorting_group_listeners
yaml
# Doorman Standard Firmware (Home Assistant)
# Base Board DOORMAN-S3-REV2

# You can change a few options here.
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"
  ap_password: "Op3n-Sesame!"
  # DO NOT CHANGE - INTERNALLY USED
  branch: "dev"
  firmware_type: "standard"
  api_variant: "ha"
  host_platform: "doorman-s3-rev2"

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

packages:
  host: github://azoninc/doorman/firmware/packages/host/${host_platform}.yaml@${branch}
  rgb_status_led: github://azoninc/doorman/firmware/packages/common/rgb-status-led.yaml@${branch}
  solid_state_relay: github://azoninc/doorman/firmware/packages/common/relay.yaml@${branch}
  extension_board: github://azoninc/doorman/firmware/packages/extension_boards/common.yaml@${branch}
  external_components: github://azoninc/doorman/firmware/packages/common/external-components.yaml@${branch}
  base: github://azoninc/doorman/firmware/packages/common/base.yaml@${branch}
  wifi: github://azoninc/doorman/firmware/packages/common/wifi.yaml@${branch}
  wifi_psram: github://azoninc/doorman/firmware/packages/common/wifi.psram.yaml@${branch}
  ota_esphome: github://azoninc/doorman/firmware/packages/ota/esphome.yaml@${branch}
  api: github://azoninc/doorman/firmware/packages/api/homeassistant.yaml@${branch}
  debug_utilities: github://azoninc/doorman/firmware/packages/debug/debug-utilities.yaml@${branch}
  debug_component: github://azoninc/doorman/firmware/packages/debug/debug-component.yaml@${branch}
  pattern_events: github://azoninc/doorman/firmware/packages/pattern_events/pattern-events.yaml@${branch}
  ring_to_open: github://azoninc/doorman/firmware/packages/ring_to_open/ring-to-open.yaml@${branch}
  indoor_station_settings: github://azoninc/doorman/firmware/packages/bus_devices/indoor-station-settings.yaml@${branch}
  interactive_setup: github://azoninc/doorman/firmware/packages/bus_devices/interactive-setup.yaml@${branch}

binary_sensor: 
  - platform: tc_bus
    name: "Custom Telegram"
    telegram: 0x00001100
    web_server: 
      sorting_group_id: sorting_group_listeners

Control the internal RGB Status LED

To control the onboard RGB LED with a button (for example), just reference the light entity with the internal id: doorman_rgb_status_led.

yaml
# Doorman Standard Firmware (Home Assistant)
# Base Board DOORMAN-S3-REV2

# You can change a few options here.
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"
  ap_password: "Op3n-Sesame!"
  # DO NOT CHANGE - INTERNALLY USED
  branch: "dev"
  firmware_type: "standard"
  api_variant: "ha"
  host_platform: "doorman-s3-rev2"

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

packages:
  host: github://azoninc/doorman/firmware/packages/host/${host_platform}.yaml@${branch}
  rgb_status_led: github://azoninc/doorman/firmware/packages/common/rgb-status-led.yaml@${branch}
  solid_state_relay: github://azoninc/doorman/firmware/packages/common/relay.yaml@${branch}
  extension_board: github://azoninc/doorman/firmware/packages/extension_boards/common.yaml@${branch}
  external_components: github://azoninc/doorman/firmware/packages/common/external-components.yaml@${branch}
  base: github://azoninc/doorman/firmware/packages/common/base.yaml@${branch}
  wifi: github://azoninc/doorman/firmware/packages/common/wifi.yaml@${branch}
  wifi_psram: github://azoninc/doorman/firmware/packages/common/wifi.psram.yaml@${branch}
  ota_esphome: github://azoninc/doorman/firmware/packages/ota/esphome.yaml@${branch}
  api: github://azoninc/doorman/firmware/packages/api/homeassistant.yaml@${branch}
  debug_utilities: github://azoninc/doorman/firmware/packages/debug/debug-utilities.yaml@${branch}
  debug_component: github://azoninc/doorman/firmware/packages/debug/debug-component.yaml@${branch}
  pattern_events: github://azoninc/doorman/firmware/packages/pattern_events/pattern-events.yaml@${branch}
  ring_to_open: github://azoninc/doorman/firmware/packages/ring_to_open/ring-to-open.yaml@${branch}
  indoor_station_settings: github://azoninc/doorman/firmware/packages/bus_devices/indoor-station-settings.yaml@${branch}
  interactive_setup: github://azoninc/doorman/firmware/packages/bus_devices/interactive-setup.yaml@${branch}

button: 
  - platform: template
    name: "Turn on Status RGB LED to red"
    on_press: 
      - light.turn_on: 
          id: doorman_rgb_status_led
          red: 100%
          green: 0%
          blue: 0%

Use the External Hardware Button

If you want to use the external button to trigger automations, extend either the binary sensor or the event entity (which already provides several event types) with your own custom actions.

yaml
# Doorman Standard Firmware (Home Assistant)
# Base Board DOORMAN-S3-REV2

# You can change a few options here.
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"
  ap_password: "Op3n-Sesame!"
  # DO NOT CHANGE - INTERNALLY USED
  branch: "dev"
  firmware_type: "standard"
  api_variant: "ha"
  host_platform: "doorman-s3-rev2"

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

packages:
  host: github://azoninc/doorman/firmware/packages/host/${host_platform}.yaml@${branch}
  rgb_status_led: github://azoninc/doorman/firmware/packages/common/rgb-status-led.yaml@${branch}
  solid_state_relay: github://azoninc/doorman/firmware/packages/common/relay.yaml@${branch}
  extension_board: github://azoninc/doorman/firmware/packages/extension_boards/common.yaml@${branch}
  external_components: github://azoninc/doorman/firmware/packages/common/external-components.yaml@${branch}
  base: github://azoninc/doorman/firmware/packages/common/base.yaml@${branch}
  wifi: github://azoninc/doorman/firmware/packages/common/wifi.yaml@${branch}
  wifi_psram: github://azoninc/doorman/firmware/packages/common/wifi.psram.yaml@${branch}
  ota_esphome: github://azoninc/doorman/firmware/packages/ota/esphome.yaml@${branch}
  api: github://azoninc/doorman/firmware/packages/api/homeassistant.yaml@${branch}
  debug_utilities: github://azoninc/doorman/firmware/packages/debug/debug-utilities.yaml@${branch}
  debug_component: github://azoninc/doorman/firmware/packages/debug/debug-component.yaml@${branch}
  pattern_events: github://azoninc/doorman/firmware/packages/pattern_events/pattern-events.yaml@${branch}
  ring_to_open: github://azoninc/doorman/firmware/packages/ring_to_open/ring-to-open.yaml@${branch}
  indoor_station_settings: github://azoninc/doorman/firmware/packages/bus_devices/indoor-station-settings.yaml@${branch}
  interactive_setup: github://azoninc/doorman/firmware/packages/bus_devices/interactive-setup.yaml@${branch}

binary_sensor: 
  - id: !extend doorman_external_button
    on_press: 
      - logger.log: "External button pressed!"
yaml
# Doorman Standard Firmware (Home Assistant)
# Base Board DOORMAN-S3-REV2

# You can change a few options here.
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"
  ap_password: "Op3n-Sesame!"
  # DO NOT CHANGE - INTERNALLY USED
  branch: "dev"
  firmware_type: "standard"
  api_variant: "ha"
  host_platform: "doorman-s3-rev2"

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

packages:
  host: github://azoninc/doorman/firmware/packages/host/${host_platform}.yaml@${branch}
  rgb_status_led: github://azoninc/doorman/firmware/packages/common/rgb-status-led.yaml@${branch}
  solid_state_relay: github://azoninc/doorman/firmware/packages/common/relay.yaml@${branch}
  extension_board: github://azoninc/doorman/firmware/packages/extension_boards/common.yaml@${branch}
  external_components: github://azoninc/doorman/firmware/packages/common/external-components.yaml@${branch}
  base: github://azoninc/doorman/firmware/packages/common/base.yaml@${branch}
  wifi: github://azoninc/doorman/firmware/packages/common/wifi.yaml@${branch}
  wifi_psram: github://azoninc/doorman/firmware/packages/common/wifi.psram.yaml@${branch}
  ota_esphome: github://azoninc/doorman/firmware/packages/ota/esphome.yaml@${branch}
  api: github://azoninc/doorman/firmware/packages/api/homeassistant.yaml@${branch}
  debug_utilities: github://azoninc/doorman/firmware/packages/debug/debug-utilities.yaml@${branch}
  debug_component: github://azoninc/doorman/firmware/packages/debug/debug-component.yaml@${branch}
  pattern_events: github://azoninc/doorman/firmware/packages/pattern_events/pattern-events.yaml@${branch}
  ring_to_open: github://azoninc/doorman/firmware/packages/ring_to_open/ring-to-open.yaml@${branch}
  indoor_station_settings: github://azoninc/doorman/firmware/packages/bus_devices/indoor-station-settings.yaml@${branch}
  interactive_setup: github://azoninc/doorman/firmware/packages/bus_devices/interactive-setup.yaml@${branch}

event: 
  - id: !extend doorman_external_button_event
    on_event: 
      - lambda: |-
          ESP_LOGD("main", "External Button Event %s triggered.", event_type.c_str()); # [!code ++] [!code focus]

Use I²C Sensors

If you want to add sensors via the I²C bus, you can use the two available GPIO pins and add the I²C component to your configuration. You can then attach your sensors to these two I²C GPIO pins.

yaml
# Doorman Standard Firmware (Home Assistant)
# Base Board DOORMAN-S3-REV2

# You can change a few options here.
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"
  ap_password: "Op3n-Sesame!"
  # DO NOT CHANGE - INTERNALLY USED
  branch: "dev"
  firmware_type: "standard"
  api_variant: "ha"
  host_platform: "doorman-s3-rev2"

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

packages:
  host: github://azoninc/doorman/firmware/packages/host/${host_platform}.yaml@${branch}
  rgb_status_led: github://azoninc/doorman/firmware/packages/common/rgb-status-led.yaml@${branch}
  solid_state_relay: github://azoninc/doorman/firmware/packages/common/relay.yaml@${branch}
  extension_board: github://azoninc/doorman/firmware/packages/extension_boards/common.yaml@${branch}
  external_components: github://azoninc/doorman/firmware/packages/common/external-components.yaml@${branch}
  base: github://azoninc/doorman/firmware/packages/common/base.yaml@${branch}
  wifi: github://azoninc/doorman/firmware/packages/common/wifi.yaml@${branch}
  wifi_psram: github://azoninc/doorman/firmware/packages/common/wifi.psram.yaml@${branch}
  ota_esphome: github://azoninc/doorman/firmware/packages/ota/esphome.yaml@${branch}
  api: github://azoninc/doorman/firmware/packages/api/homeassistant.yaml@${branch}
  debug_utilities: github://azoninc/doorman/firmware/packages/debug/debug-utilities.yaml@${branch}
  debug_component: github://azoninc/doorman/firmware/packages/debug/debug-component.yaml@${branch}
  pattern_events: github://azoninc/doorman/firmware/packages/pattern_events/pattern-events.yaml@${branch}
  ring_to_open: github://azoninc/doorman/firmware/packages/ring_to_open/ring-to-open.yaml@${branch}
  indoor_station_settings: github://azoninc/doorman/firmware/packages/bus_devices/indoor-station-settings.yaml@${branch}
  interactive_setup: github://azoninc/doorman/firmware/packages/bus_devices/interactive-setup.yaml@${branch}

i2c: 
  sda: GPIO40
  scl: GPIO48
  scan: true
  id: i2c_bus
yaml
# Doorman Standard Firmware (Home Assistant)
# Base Board DOORMAN-S3-REV2

# You can change a few options here.
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"
  ap_password: "Op3n-Sesame!"
  # DO NOT CHANGE - INTERNALLY USED
  branch: "dev"
  firmware_type: "standard"
  api_variant: "ha"
  host_platform: "doorman-s3-rev2"

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

packages:
  host: github://azoninc/doorman/firmware/packages/host/${host_platform}.yaml@${branch}
  rgb_status_led: github://azoninc/doorman/firmware/packages/common/rgb-status-led.yaml@${branch}
  solid_state_relay: github://azoninc/doorman/firmware/packages/common/relay.yaml@${branch}
  extension_board: github://azoninc/doorman/firmware/packages/extension_boards/common.yaml@${branch}
  external_components: github://azoninc/doorman/firmware/packages/common/external-components.yaml@${branch}
  base: github://azoninc/doorman/firmware/packages/common/base.yaml@${branch}
  wifi: github://azoninc/doorman/firmware/packages/common/wifi.yaml@${branch}
  wifi_psram: github://azoninc/doorman/firmware/packages/common/wifi.psram.yaml@${branch}
  ota_esphome: github://azoninc/doorman/firmware/packages/ota/esphome.yaml@${branch}
  api: github://azoninc/doorman/firmware/packages/api/homeassistant.yaml@${branch}
  debug_utilities: github://azoninc/doorman/firmware/packages/debug/debug-utilities.yaml@${branch}
  debug_component: github://azoninc/doorman/firmware/packages/debug/debug-component.yaml@${branch}
  pattern_events: github://azoninc/doorman/firmware/packages/pattern_events/pattern-events.yaml@${branch}
  ring_to_open: github://azoninc/doorman/firmware/packages/ring_to_open/ring-to-open.yaml@${branch}
  indoor_station_settings: github://azoninc/doorman/firmware/packages/bus_devices/indoor-station-settings.yaml@${branch}
  interactive_setup: github://azoninc/doorman/firmware/packages/bus_devices/interactive-setup.yaml@${branch}

i2c: 
  sda: GPIO40
  scl: GPIO41
  scan: true
  id: i2c_bus

REVISION 1.6+

Beginning with Doorman revision 1.6, the external button must be removed from your configuration YAML.

REVISION 2.x.x

Beginning with Doorman revision 2.0, I²C is generally available via the extension board connector.

Create Your Own Doorbell Pattern

If you want to create a custom doorbell pattern, you can easily extend the existing doorbell entities. For more information about patterns, refer to the ESPHome Docs.

yaml
# Doorman Standard Firmware (Home Assistant)
# Base Board DOORMAN-S3-REV2

# You can change a few options here.
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"
  ap_password: "Op3n-Sesame!"
  # DO NOT CHANGE - INTERNALLY USED
  branch: "dev"
  firmware_type: "standard"
  api_variant: "ha"
  host_platform: "doorman-s3-rev2"

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

packages:
  host: github://azoninc/doorman/firmware/packages/host/${host_platform}.yaml@${branch}
  rgb_status_led: github://azoninc/doorman/firmware/packages/common/rgb-status-led.yaml@${branch}
  solid_state_relay: github://azoninc/doorman/firmware/packages/common/relay.yaml@${branch}
  extension_board: github://azoninc/doorman/firmware/packages/extension_boards/common.yaml@${branch}
  external_components: github://azoninc/doorman/firmware/packages/common/external-components.yaml@${branch}
  base: github://azoninc/doorman/firmware/packages/common/base.yaml@${branch}
  wifi: github://azoninc/doorman/firmware/packages/common/wifi.yaml@${branch}
  wifi_psram: github://azoninc/doorman/firmware/packages/common/wifi.psram.yaml@${branch}
  ota_esphome: github://azoninc/doorman/firmware/packages/ota/esphome.yaml@${branch}
  api: github://azoninc/doorman/firmware/packages/api/homeassistant.yaml@${branch}
  debug_utilities: github://azoninc/doorman/firmware/packages/debug/debug-utilities.yaml@${branch}
  debug_component: github://azoninc/doorman/firmware/packages/debug/debug-component.yaml@${branch}
  pattern_events: github://azoninc/doorman/firmware/packages/pattern_events/pattern-events.yaml@${branch}
  ring_to_open: github://azoninc/doorman/firmware/packages/ring_to_open/ring-to-open.yaml@${branch}
  indoor_station_settings: github://azoninc/doorman/firmware/packages/bus_devices/indoor-station-settings.yaml@${branch}
  interactive_setup: github://azoninc/doorman/firmware/packages/bus_devices/interactive-setup.yaml@${branch}

# Extend the doorbell_pattern event entity
# Add a new special event type
event: 
  - id: !extend apartment_doorbell_pattern
    event_types: 
      - "special"

# Extend the Ring-To-Open Pattern Conditions
# You need to extend each Door Pattern Condition where you want to use the pattern
select: 
  - id: !extend rto_apartment_door_pattern_condition
    options: 
      - "special"

# Extend the apartment_doorbell / entrance_doorbell entity
# and add your new special pattern
binary_sensor: 
  - id: !extend apartment_doorbell
    on_multi_click: 
      # Special Pattern
      - timing: 
          # Press twice quickly with at most half a second in between.
          - ON for at most 0.3s
          - OFF for at most 0.5s
          - ON for at most 0.3s
          - OFF for 1s to 1.5s
          # Press once slowly with at most 1.5 seconds in between.
          - ON for at most 0.3s
          - OFF for 1s to 1.5s
          # Press once
          - ON for at most 0.3s
          - OFF for at least 2s
        then: 
          - logger.log: "Special pattern detected!"
          - event.trigger: 
              id: apartment_doorbell_pattern
              # Use the previously defined new event type here
              event_type: special

Light On When Entrance Doorbell Rings

You can easily set up an automation to turn on the light whenever someone rings the entrance doorbell. This can be useful for enhancing visibility or simply making it easier to see who is at the door. Simply configure the automation to trigger the light based on the doorbell event.

yaml
# Doorman Standard Firmware (Home Assistant)
# Base Board DOORMAN-S3-REV2

# You can change a few options here.
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"
  ap_password: "Op3n-Sesame!"
  # DO NOT CHANGE - INTERNALLY USED
  branch: "dev"
  firmware_type: "standard"
  api_variant: "ha"
  host_platform: "doorman-s3-rev2"

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

packages:
  host: github://azoninc/doorman/firmware/packages/host/${host_platform}.yaml@${branch}
  rgb_status_led: github://azoninc/doorman/firmware/packages/common/rgb-status-led.yaml@${branch}
  solid_state_relay: github://azoninc/doorman/firmware/packages/common/relay.yaml@${branch}
  extension_board: github://azoninc/doorman/firmware/packages/extension_boards/common.yaml@${branch}
  external_components: github://azoninc/doorman/firmware/packages/common/external-components.yaml@${branch}
  base: github://azoninc/doorman/firmware/packages/common/base.yaml@${branch}
  wifi: github://azoninc/doorman/firmware/packages/common/wifi.yaml@${branch}
  wifi_psram: github://azoninc/doorman/firmware/packages/common/wifi.psram.yaml@${branch}
  ota_esphome: github://azoninc/doorman/firmware/packages/ota/esphome.yaml@${branch}
  api: github://azoninc/doorman/firmware/packages/api/homeassistant.yaml@${branch}
  debug_utilities: github://azoninc/doorman/firmware/packages/debug/debug-utilities.yaml@${branch}
  debug_component: github://azoninc/doorman/firmware/packages/debug/debug-component.yaml@${branch}
  pattern_events: github://azoninc/doorman/firmware/packages/pattern_events/pattern-events.yaml@${branch}
  ring_to_open: github://azoninc/doorman/firmware/packages/ring_to_open/ring-to-open.yaml@${branch}
  indoor_station_settings: github://azoninc/doorman/firmware/packages/bus_devices/indoor-station-settings.yaml@${branch}
  interactive_setup: github://azoninc/doorman/firmware/packages/bus_devices/interactive-setup.yaml@${branch}

binary_sensor: 
  - id: !extend entrance_doorbell
    on_press: 
      - tc_bus.send: 
          type: "light"
yaml
# Doorman Standard Firmware (Home Assistant)
# Base Board DOORMAN-S3-REV2

# You can change a few options here.
substitutions:
  name: "doorman-s3"
  friendly_name: "Doorman S3"
  ap_password: "Op3n-Sesame!"
  # DO NOT CHANGE - INTERNALLY USED
  branch: "dev"
  firmware_type: "standard"
  api_variant: "ha"
  host_platform: "doorman-s3-rev2"

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

packages:
  host: github://azoninc/doorman/firmware/packages/host/${host_platform}.yaml@${branch}
  rgb_status_led: github://azoninc/doorman/firmware/packages/common/rgb-status-led.yaml@${branch}
  solid_state_relay: github://azoninc/doorman/firmware/packages/common/relay.yaml@${branch}
  extension_board: github://azoninc/doorman/firmware/packages/extension_boards/common.yaml@${branch}
  external_components: github://azoninc/doorman/firmware/packages/common/external-components.yaml@${branch}
  base: github://azoninc/doorman/firmware/packages/common/base.yaml@${branch}
  wifi: github://azoninc/doorman/firmware/packages/common/wifi.yaml@${branch}
  wifi_psram: github://azoninc/doorman/firmware/packages/common/wifi.psram.yaml@${branch}
  ota_esphome: github://azoninc/doorman/firmware/packages/ota/esphome.yaml@${branch}
  api: github://azoninc/doorman/firmware/packages/api/homeassistant.yaml@${branch}
  debug_utilities: github://azoninc/doorman/firmware/packages/debug/debug-utilities.yaml@${branch}
  debug_component: github://azoninc/doorman/firmware/packages/debug/debug-component.yaml@${branch}
  pattern_events: github://azoninc/doorman/firmware/packages/pattern_events/pattern-events.yaml@${branch}
  ring_to_open: github://azoninc/doorman/firmware/packages/ring_to_open/ring-to-open.yaml@${branch}
  indoor_station_settings: github://azoninc/doorman/firmware/packages/bus_devices/indoor-station-settings.yaml@${branch}
  interactive_setup: github://azoninc/doorman/firmware/packages/bus_devices/interactive-setup.yaml@${branch}

# Import the Home Assistant sun elevation sensor
sensor: 
  - platform: homeassistant
    id: sun_elevation
    entity_id: sun.sun
    attribute: elevation

# Extend the entrance doorbell sensor
binary_sensor: 
  - id: !extend entrance_doorbell
    on_press: 
      # Sun elevation is <= 0 (dark)
      - if: 
          condition: 
            sensor.in_range: 
              id: sun_elevation
              below: 1
          then: 
            # Turn on the light
            - tc_bus.send: 
                type: "light"

Released under the GPL 3.0 License.