- Home Assistant with Supervisor (Home Assistant OS or Supervised)
- ESPHome Add-on installed
- Go to Settings → Add-ons → Add-on Store
- Search for "ESPHome"
- Click Install on the official ESPHome add-on
- Start the add-on and enable Start on boot
- Open ESPHome add-on web UI
- Click + NEW DEVICE
- Choose Continue
- Enter device details:
- Name:
smart-doorbell-project - Device Type: Choose ESP32
- Name:
- Skip the wireless credentials (we'll use existing config)
- In ESPHome dashboard, click EDIT on your new device
- Replace the generated content with your
smart-doorbell-project.yamlcontent - Create a
secrets.yamlfile with:wifi_ssid: "Your_WiFi_Name" wifi_password: "Your_WiFi_Password" api_encryption_key_sdb: "your-32-character-base64-encryption-key" ota_password_sdb: "your-secure-ota-password" ap_wifi_password_sdb: "your-hotspot-password"
- Click SAVE
- Click INSTALL
- Choose Wirelessly (if device is already flashed) or Plug into this computer
- Wait for compilation and upload
- Once online, the device should appear in Settings → Devices & Services
- Look for "ESPHome" integration with your device
- Click CONFIGURE if prompted
Your configuration already has the API enabled:
api:
encryption:
key: !secret api_encryption_key_sdb- Go to Settings → Devices & Services
- Click + ADD INTEGRATION
- Search for "ESPHome"
- Enter your ESP32's IP address
- Enter the encryption key from your ESPHome config
mqtt:
broker: your_mqtt_broker_ip
username: !secret mqtt_username
password: !secret mqtt_password
discovery: true
discovery_retain: false
topic_prefix: esphome/smart_doorbell_projectAdd this to your ESPHome configuration for better device identification:
esphome:
name: smart-doorbell-project
friendly_name: Smart Doorbell Project
comment: "Smart doorbell with chime control system"
project:
name: "custom.smart_doorbell"
version: "1.0"
# Device information for Home Assistant
device_info:
manufacturer: "Custom Build"
model: "ESP32 Smart Doorbell"
sw_version: "1.0"After successful integration, you'll see these entities:
switch.doorbell_chime_active- Enable/disable the chimeswitch.doorbell_restart- Remotely restart the device
binary_sensor.doorbell- Shows when doorbell button is pressedsensor.doorbell_uptime- Device uptimesensor.doorbell_wifi_signal- WiFi signal strength
binary_sensor.smart_doorbell_project_status(online/offline)
type: entities
title: Smart Doorbell System
entities:
- entity: binary_sensor.doorbell
name: Doorbell Button
- entity: switch.doorbell_chime_active
name: Chime Active
- type: divider
- entity: sensor.doorbell_uptime
name: System Uptime
- entity: sensor.doorbell_wifi_signal
name: WiFi Signal
- type: divider
- entity: switch.doorbell_restart
name: Restart Device# Example: Notification when doorbell is pressed
automation:
- alias: "Doorbell Notification"
trigger:
- platform: state
entity_id: binary_sensor.doorbell
to: 'on'
action:
- service: notify.mobile_app_your_phone
data:
title: "Doorbell"
message: "Someone is at the door!"
# Example: Disable chime at night
- alias: "Disable doorbell chime at night"
trigger:
- platform: time
at: "22:00:00"
action:
- service: switch.turn_off
target:
entity_id: switch.doorbell_chime_active
# Example: Enable chime in morning
- alias: "Enable doorbell chime in morning"
trigger:
- platform: time
at: "07:00:00"
action:
- service: switch.turn_on
target:
entity_id: switch.doorbell_chime_active- Check Network: Ensure ESP32 and HA are on same network
- Verify API: Confirm API encryption key matches
- Check Logs: Look in HA logs for connection errors
- Manual Add: Try adding via IP address manually
- Firewall: Ensure port 6053 is open for ESPHome API
- WiFi Signal: Check
sensor.doorbell_wifi_signalstrength - Restart: Reboot both ESP32 and Home Assistant
- Entity names will be prefixed with your device name
- Use Settings → Devices & Services → ESPHome → your device to customize entity names
Create groups for easier management:
# In configuration.yaml
group:
doorbell_system:
name: "Smart Doorbell System"
entities:
- switch.doorbell_chime_active
- binary_sensor.doorbell
- sensor.doorbell_uptime
- sensor.doorbell_wifi_signalCreate calculated sensors:
# Doorbell activity counter
template:
- sensor:
- name: "Daily Doorbell Presses"
state: >
{{ states.binary_sensor.doorbell.attributes.get('count', 0) }}
unit_of_measurement: "presses"Once you follow these steps, your ESPHome smart doorbell system will be fully integrated into Home Assistant with all entities available for monitoring, control, and automation!