Dear,
I just build a RFID card reader following this topic : GitHub - adonno/tagreader: Simple to build/use NFC tag reader, specially created for Home Assistant
After installing and chage some line in the code received because… the PIN6 and 7 was not able…
So I placed the buzzer on PIN3 and remove all code regarding the LED as the PIN 4 was already used in the code it seems…
I reached to read two RFID TAG and even made an automation to turn light on with one of them.
But after 10 minutes… not possible de read any TAG RFID.
I restart the ESP8266 but nothing…
You’ll find the LOG for a restart of the ESP8266 as follow :
[21:53:34][D][api.connection:199]: Home Assistant 2025.3.3 (192.168.68.64) requested disconnected
[21:53:34][W][component:157]: Component api set Warning flag: unspecified
[21:53:34][D][binary_sensor:036]: '${friendly_name} Status': Sending state OFF
[21:53:34][D][api:103]: Accepted 192.168.68.64
[21:53:34][W][component:170]: Component api cleared Warning flag
[21:53:34][W][component:237]: Component api took a long time for an operation (293 ms).
[21:53:34][W][component:238]: Components should block for at most 30 ms.
[21:53:34][D][binary_sensor:036]: '${friendly_name} Status': Sending state ON
[21:53:34][D][api.connection:1446]: Home Assistant 2025.3.3 (192.168.68.64): Connected successfully
[21:53:34][D][switch:016]: '${friendly_name} Buzzer Enabled' Turning OFF.
[21:53:34][D][switch:055]: '${friendly_name} Buzzer Enabled': Sending state OFF
[21:53:34][D][switch:016]: '${friendly_name} LED enabled' Turning OFF.
[21:53:34][D][switch:055]: '${friendly_name} LED enabled': Sending state OFF
[21:54:01][D][switch:012]: '${friendly_name} Buzzer Enabled' Turning ON.
[21:54:01][D][switch:055]: '${friendly_name} Buzzer Enabled': Sending state ON
[21:56:39][D][button:010]: 'Cancel writing' Pressed.
[21:56:39][D][pn532:379]: Waiting to read next tag
[21:56:39][D][rtttl:061]: Playing song write
[21:56:39][D][rtttl:390]: State changed from STATE_STOPPED to STATE_RUNNING
[21:56:40][D][rtttl:390]: State changed from STATE_RUNNING to STATE_STOPPED
[21:56:40][D][rtttl:367]: Playback finished
[21:56:48][D][button:010]: '${friendly_name} Restart' Pressed.
[21:56:48][I][restart.button:012]: Restarting device...
[21:56:48][I][app:132]: Rebooting safely...
[21:56:48][I][pn532:087]: Powering down PN532
[21:56:48][W][wifi_esp8266:513]: Event: Disconnected ssid='WiFi-2.4-F9E8' bssid=E4:FA:C4:B8:2A:12[redacted] reason='Association Leave'
[21:56:48]
[21:56:48] ets Jan 8 2013,rst cause:2, boot mode:(3,6)
[21:56:48]
[21:56:48]load 0x4010f000, len 3424, room 16
[21:56:48]tail 0
[21:56:48]chksum 0x2e
[21:56:48]load 0x3fff20b8, len 40, room 8
[21:56:48]tail 0
[21:56:48]chksum 0x2b
[21:56:48]csum 0x2b
[21:56:48]v0008b890
[21:56:48]~ld
[21:56:48] o { '| d {dc |{ l o o d` s l d [I][logger:034]: Log initialized
[21:56:48][C][safe_mode:079]: There have been 0 suspected unsuccessful boot attempts
[21:56:48][I][app:029]: Running through setup()...
[21:56:48][I][i2c.arduino:218]: Performing I2C bus recovery
[21:56:48][C][esp8266_pwm:017]: Setting up ESP8266 PWM Output...
[21:56:48][D][template.switch:046]: Restored state ON
[21:56:48][D][switch:012]: '${friendly_name} Buzzer Enabled' Turning ON.
[21:56:48][D][switch:055]: '${friendly_name} Buzzer Enabled': Sending state ON
[21:56:48][D][template.switch:046]: Restored state OFF
[21:56:48][D][switch:016]: '${friendly_name} LED enabled' Turning OFF.
[21:56:48][D][switch:055]: '${friendly_name} LED enabled': Sending state OFF
[21:56:48][C][pn532:018]: Setting up PN532...
[21:56:48][D][pn532:036]: Found chip PN532
[21:56:48][D][pn532:037]: Firmware ver. 1.6
[21:56:48][D][binary_sensor:034]: '${friendly_name} Status': Sending initial state OFF
[21:56:48][D][text_sensor:064]: '${friendly_name} ESPHome Version': Sending state '2025.2.2'
[21:56:48][C][wifi:048]: Setting up WiFi...
[21:56:48][C][wifi:061]: Starting WiFi...
[21:56:48][C][wifi:062]: Local MAC: 40:F5:20:3F:8E:3C
[21:56:48][D][wifi:482]: Starting scan...
[21:56:48][W][component:157]: Component wifi set Warning flag: scanning for networks
[21:56:54][D][wifi:497]: Found networks:
[21:56:54][I][wifi:540]: - 'WiFi-2.4-F9E8' (E4:FA:C4:B8:57:C2) [redacted]▂▄▆█
[21:56:54][D][wifi:542]: Channel: 3
[21:56:54][D][wifi:543]: RSSI: -51 dB
[21:56:54][I][wifi:540]: - 'WiFi-2.4-F9E8' (E4:FA:C4:B8:2A:12) [redacted]▂▄▆█
[21:56:54][D][wifi:542]: Channel: 3
[21:56:54][D][wifi:543]: RSSI: -53 dB
[21:56:54][I][wifi:540]: - 'WiFi-2.4-F9E8' (E4:FA:C4:B8:57:BE) [redacted]▂▄▆█
[21:56:54][D][wifi:542]: Channel: 3
[21:56:54][D][wifi:543]: RSSI: -56 dB
[21:56:54][I][wifi:540]: - 'WiFi-2.4-F9E8' (DC:62:79:78:9C:36) [redacted]▂▄▆█
[21:56:54][D][wifi:542]: Channel: 3
[21:56:54][D][wifi:543]: RSSI: -76 dB
[21:56:54][D][wifi:545]: - ''[redacted] (EA:FA:C4:B8:57:C2) [redacted]▂▄▆█
[21:56:54][D][wifi:545]: - ''[redacted] (EA:FA:C4:B8:2A:12) [redacted]▂▄▆█
[21:56:54][D][wifi:545]: - ''[redacted] (EA:FA:C4:B8:57:BE) [redacted]▂▄▆█
[21:56:54][D][wifi:545]: - ''[redacted] (62:15:A2:44:EE:A9) [redacted]▂▄▆█
[21:56:54][D][wifi:545]: - ''[redacted] (E2:62:79:78:9C:36) [redacted]▂▄▆█
[21:56:54][D][wifi:545]: - 'SUN2000-HV2250364839'[redacted] (14:AB:02:CD:08:F1) [redacted]▂▄▆█
[21:56:54][I][wifi:313]: WiFi Connecting to 'WiFi-2.4-F9E8'...
[21:56:58][I][wifi:617]: WiFi Connected!
[21:56:58][C][wifi:428]: Local MAC: 40:F5:20:3F:8E:3C
[21:56:58][C][wifi:433]: SSID: 'WiFi-2.4-F9E8'[redacted]
[21:56:58][C][wifi:436]: IP Address: 192.168.68.67
[21:56:58][C][wifi:439]: BSSID: E4:FA:C4:B8:57:C2[redacted]
[21:56:58][C][wifi:441]: Hostname: 'lecteur-badge-3f8e3c'
[21:56:58][C][wifi:443]: Signal strength: -54 dB ▂▄▆█
[21:56:58][C][wifi:447]: Channel: 3
[21:56:58][C][wifi:448]: Subnet: 255.255.252.0
[21:56:58][C][wifi:449]: Gateway: 192.168.68.1
[21:56:58][C][wifi:450]: DNS1: 192.168.1.1
[21:56:58][C][wifi:451]: DNS2: 192.168.1.1
[21:56:58][D][wifi:626]: Disabling AP...
[21:56:58][C][api:026]: Setting up Home Assistant API server...
[21:56:58][I][app:062]: setup() finished successfully!
[21:56:58][D][text_sensor:064]: '${friendly_name} IP Address': Sending state '192.168.68.67'
[21:56:58][D][text_sensor:064]: '${friendly_name} Connected SSID': Sending state 'WiFi-2.4-F9E8'
[21:56:58][W][component:170]: Component wifi cleared Warning flag
[21:56:58][W][component:157]: Component api set Warning flag: unspecified
[21:56:58][I][app:100]: ESPHome version 2025.2.2 compiled on Mar 19 2025, 21:02:01
[21:56:58][I][app:102]: Project adonno.tag_reader version dev
[21:56:58][C][wifi:600]: WiFi:
[21:56:58][C][wifi:428]: Local MAC: 40:F5:20:3F:8E:3C
[21:56:58][C][wifi:433]: SSID: 'WiFi-2.4-F9E8'[redacted]
[21:56:58][C][wifi:436]: IP Address: 192.168.68.67
[21:56:58][C][wifi:439]: BSSID: E4:FA:C4:B8:57:C2[redacted]
[21:56:58][C][wifi:441]: Hostname: 'lecteur-badge-3f8e3c'
[21:56:58][C][wifi:443]: Signal strength: -55 dB ▂▄▆█
[21:56:58][C][wifi:447]: Channel: 3
[21:56:58][C][wifi:448]: Subnet: 255.255.252.0
[21:56:58][C][wifi:449]: Gateway: 192.168.68.1
[21:56:58][C][wifi:450]: DNS1: 192.168.1.1
[21:56:58][C][wifi:451]: DNS2: 192.168.1.1
[21:56:58][C][logger:177]: Logger:
[21:56:58][C][logger:178]: Max Level: DEBUG
[21:56:58][C][logger:179]: Initial Level: DEBUG
[21:56:58][C][logger:181]: Log Baud Rate: 115200
[21:56:58][C][logger:182]: Hardware UART: UART0
[21:56:58][C][i2c.arduino:071]: I2C Bus:
[21:56:58][C][i2c.arduino:072]: SDA Pin: GPIO4
[21:56:58][C][i2c.arduino:073]: SCL Pin: GPIO5
[21:56:58][C][i2c.arduino:074]: Frequency: 400000 Hz
[21:56:58][C][i2c.arduino:086]: Recovery: bus successfully recovered
[21:56:58][C][esp8266_pwm:022]: ESP8266 PWM:
[21:56:58][C][esp8266_pwm:023]: Pin: GPIO3
[21:56:58][C][esp8266_pwm:024]: Frequency: 1000.0 Hz
[21:56:58][C][template.switch:068]: Template Switch '${friendly_name} Buzzer Enabled'
[21:56:58][C][template.switch:070]: Icon: 'mdi:volume-high'
[21:56:58][C][template.switch:090]: Restore Mode: restore defaults to ON
[21:56:58][C][template.switch:057]: Optimistic: YES
[21:56:58][C][template.switch:068]: Template Switch '${friendly_name} LED enabled'
[21:56:58][C][template.switch:070]: Icon: 'mdi:alarm-light-outline'
[21:56:58][C][template.switch:090]: Restore Mode: restore defaults to ON
[21:56:58][C][template.switch:057]: Optimistic: YES
[21:56:58][C][restart.button:017]: Restart Button '${friendly_name} Restart'
[21:56:58][C][restart.button:017]: Icon: 'mdi:restart'
[21:56:58][C][pn532:431]: PN532:
[21:56:58][C][pn532:443]: Update Interval: 1.0s
[21:56:58][C][pn532_i2c:125]: Address: 0x24
[21:56:58][C][status:034]: Status Binary Sensor '${friendly_name} Status'
[21:56:58][C][status:034]: Device Class: 'connectivity'
[21:56:58][C][version.text_sensor:021]: Version Text Sensor '${friendly_name} ESPHome Version'
[21:56:58][C][version.text_sensor:021]: Icon: 'mdi:new-box'
[21:56:58][C][rtttl:030]: Rtttl:
[21:56:58][C][rtttl:031]: Gain: 0.600000
[21:56:58][C][captive_portal:089]: Captive Portal:
[21:56:58][D][api:103]: Accepted 192.168.68.64
[21:56:58][W][component:170]: Component api cleared Warning flag
[21:56:58][C][mdns:116]: mDNS:
[21:56:58][C][mdns:117]: Hostname: lecteur-badge-3f8e3c
[21:56:58][D][main:391]: API is connected!
[21:56:58][D][rtttl:061]: Playing song success
[21:56:58][D][rtttl:390]: State changed from STATE_STOPPED to STATE_RUNNING
[21:56:58][D][switch:012]: '${friendly_name} Buzzer Enabled' Turning ON.
[21:56:58][D][binary_sensor:036]: '${friendly_name} Status': Sending state ON
[21:56:58][W][component:237]: Component api took a long time for an operation (289 ms).
[21:56:58][W][component:238]: Components should block for at most 30 ms.
[21:56:58][C][esphome.ota:073]: Over-The-Air updates:
[21:56:58][C][esphome.ota:074]: Address: lecteur-badge.local:8266
[21:56:58][C][esphome.ota:075]: Version: 2
[21:56:58][C][esphome.ota:078]: Password configured
[21:56:58][C][safe_mode:018]: Safe Mode:
[21:56:58][C][safe_mode:019]: Boot considered successful after 60 seconds
[21:56:58][C][safe_mode:021]: Invoke after 10 boot attempts
[21:56:58][C][safe_mode:022]: Remain in safe mode for 300 seconds
[21:56:58][C][api:140]: API Server:
[21:56:58][C][api:141]: Address: lecteur-badge.local:6053
[21:56:58][C][api:143]: Using noise encryption: YES
[21:56:58][C][improv_serial:032]: Improv Serial:
[21:56:58][C][wifi_info:012]: WifiInfo SSID '${friendly_name} Connected SSID'
[21:56:58][C][wifi_info:012]: Icon: 'mdi:wifi-strength-2'
[21:56:58][C][wifi_info:010]: WifiInfo IPAddress '${friendly_name} IP Address'
[21:56:58][C][wifi_info:010]: Icon: 'mdi:wifi'
[21:56:59][D][rtttl:390]: State changed from STATE_RUNNING to STATE_STOPPED
[21:56:59][D][rtttl:367]: Playback finished
[21:57:01][D][api.connection:1446]: Home Assistant 2025.3.3 (192.168.68.64): Connected successfully
[21:57:48][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
THis LOG file is when I’m connected with my computer through the USB port.
If I try to connect in wireless with HA… It seems not findable…
disconnect in HA
THis is the LOG from HA :
INFO ESPHome 2025.2.2
INFO Reading configuration /config/esphome/lecteur-badge.yaml...
INFO Starting log output from lecteur-badge.local using esphome API
WARNING Can't connect to ESPHome API for lecteur-badge.local: Timeout while resolving IP address for ['lecteur-badge.local'] (ResolveTimeoutAPIError)
INFO Trying to connect to lecteur-badge.local in the background
I don’t know what happened… as I really new in HA and programming… can you help me?
for information, this is the code yaml on my ESP8266
#esphome:
# name: lecteur-badge
# friendly_name: Lecteur_badge
esp8266:
board: esp01_1m
# Enable Home Assistant API
#api:
# encryption:
# key:
#ota:
# - platform: esphome
# password:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Lecteur-Badge Fallback Hotspot"
password: "
captive_portal:
dashboard_import:
package_import_url: github://adonno/tagreader/tagreader.yaml
improv_serial:
esphome:
name: lecteur-badge
friendly_name: Lecteur_badge
# Automatically add the mac address to the name
# so you can use a single firmware for all devices
name_add_mac_suffix: true
# This will allow for (future) project identification,
# configuration and updates.
project:
name: adonno.tag_reader
version: dev
# If buzzer is enabled, notify on api connection success
on_boot:
priority: -10
then:
- wait_until:
api.connected:
- logger.log: API is connected!
- rtttl.play: "success:d=24,o=5,b=100:c,g,b"
# - light.turn_on:
# id: activity_led
# brightness: 100%
# red: 0%
# green: 0%
# blue: 100%
# flash_length: 500ms
- switch.turn_on: buzzer_enabled
# - switch.turn_on: led_enabled
# Define switches to control LED and buzzer from HA
switch:
- platform: template
name: "${friendly_name} Buzzer Enabled"
id: buzzer_enabled
icon: mdi:volume-high
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
entity_category: config
- platform: template
name: "${friendly_name} LED enabled"
id: led_enabled
icon: mdi:alarm-light-outline
optimistic: true
restore_mode: RESTORE_DEFAULT_ON
entity_category: config
# Define buttons for writing tags via HA
button:
- platform: template
name: Write Tag Random
id: write_tag_random
# Optional variables:
icon: "mdi:pencil-box"
on_press:
then:
# - light.turn_on:
# id: activity_led
# brightness: 100%
# red: 100%
# green: 0%
# blue: 100%
- lambda: |-
static const char alphanum[] = "0123456789abcdef";
std::string uri = "https://www.home-assistant.io/tag/";
for (int i = 0; i < 8; i++)
uri += alphanum[random_uint32() % (sizeof(alphanum) - 1)];
uri += "-";
for (int j = 0; j < 3; j++) {
for (int i = 0; i < 4; i++)
uri += alphanum[random_uint32() % (sizeof(alphanum) - 1)];
uri += "-";
}
for (int i = 0; i < 12; i++)
uri += alphanum[random_uint32() % (sizeof(alphanum) - 1)];
auto message = new nfc::NdefMessage();
message->add_uri_record(uri);
ESP_LOGD("tagreader", "Writing payload: %s", uri.c_str());
id(pn532_board).write_mode(message);
- rtttl.play: "write:d=24,o=5,b=100:b"
- wait_until:
not:
pn532.is_writing:
# - light.turn_off:
# id: activity_led
# - rtttl.play: "write:d=24,o=5,b=100:b,b"
- platform: template
name: Clean Tag
id: clean_tag
icon: "mdi:nfc-variant-off"
on_press:
then:
# - light.turn_on:
# id: activity_led
# brightness: 100%
# red: 100%
# green: 64.7%
# blue: 0%
- lambda: 'id(pn532_board).clean_mode();'
- rtttl.play: "write:d=24,o=5,b=100:b"
- wait_until:
not:
pn532.is_writing:
# - light.turn_off:
# id: activity_led
# - rtttl.play: "write:d=24,o=5,b=100:b,b"
- platform: template
name: Cancel writing
id: cancel_writing
icon: "mdi:pencil-off"
on_press:
then:
- lambda: 'id(pn532_board).read_mode();'
# - light.turn_off:
# id: activity_led
- rtttl.play: "write:d=24,o=5,b=100:b,b"
- platform: restart
name: "${friendly_name} Restart"
entity_category: config
# Enable logging
logger:
# level: VERY_VERBOSE
# level: VERBOSE
# Enable Home Assistant API
api:
encryption:
key: "
services:
- service: rfidreader_tag_ok
then:
- rtttl.play: "beep:d=16,o=5,b=100:b"
- service: rfidreader_tag_ko
then:
- rtttl.play: "beep:d=8,o=5,b=100:b"
- service: play_rtttl
variables:
song_str: string
then:
- rtttl.play: !lambda 'return song_str;'
- service: write_tag_id
variables:
tag_id: string
then:
# - light.turn_on:
# id: activity_led
# brightness: 100%
# red: 100%
# green: 0%
# blue: 0%
- lambda: |-
auto message = new nfc::NdefMessage();
std::string uri = "https://www.home-assistant.io/tag/";
uri += tag_id;
message->add_uri_record(uri);
id(pn532_board).write_mode(message);
- rtttl.play: "write:d=24,o=5,b=100:b"
- wait_until:
not:
pn532.is_writing:
# - light.turn_off:
# id: activity_led
- rtttl.play: "write:d=24,o=5,b=100:b,b"
- service: write_music_tag
variables:
music_url: string
music_info: string
then:
# - light.turn_on:
# id: activity_led
# brightness: 100%
# red: 100%
# green: 0%
# blue: 0%
- lambda: |-
auto message = new nfc::NdefMessage();
std::string uri = "";
std::string text = "";
uri += music_url;
text += music_info;
if ( music_url != "" ) {
message->add_uri_record(uri);
}
if ( music_info != "" ) {
message->add_text_record(text);
}
id(pn532_board).write_mode(message);
- rtttl.play: "write:d=24,o=5,b=100:b"
- wait_until:
not:
pn532.is_writing:
# - light.turn_off:
# id: activity_led
# - rtttl.play: "write:d=24,o=5,b=100:b,b"
# Enable OTA upgrade
ota:
- platform: esphome
password: "
i2c:
scan: False
frequency: 400kHz
globals:
- id: source
type: std::string
- id: url
type: std::string
- id: info
type: std::string
pn532_i2c:
id: pn532_board
on_tag:
then:
- if:
condition:
switch.is_on: led_enabled
then:
# - light.turn_on:
# id: activity_led
# brightness: 100%
# red: 0%
# green: 100%
# blue: 0%
# flash_length: 500ms
- delay: 0.15s #to fix slow component
- lambda: |-
id(source)="";
id(url)="";
id(info)="";
if (tag.has_ndef_message()) {
auto message = tag.get_ndef_message();
auto records = message->get_records();
for (auto &record : records) {
std::string payload = record->get_payload();
std::string type = record->get_type();
size_t hass = payload.find("https://www.home-assistant.io/tag/");
size_t applemusic = payload.find("https://music.apple.com");
size_t spotify = payload.find("https://open.spotify.com");
size_t sonos = payload.find("sonos-2://");
size_t mass_deezer = payload.find("deezer://");
size_t mass_filesystem_local = payload.find("filesystem_local://");
size_t mass_filesystem_smb = payload.find("filesystem_smb://");
size_t mass_plex = payload.find("plex://");
size_t mass_qobuz = payload.find("qobuz://");
size_t mass_radiobrowser = payload.find("radiobrowser://");
size_t mass_soundcloud = payload.find("soundcloud://");
size_t mass_spotify = payload.find("spotify://");
size_t mass_tidal = payload.find("tidal://");
size_t mass_tunein = payload.find("tunein://");
size_t mass_ytmusic = payload.find("ytmusic://");
if (type == "U" and hass != std::string::npos ) {
ESP_LOGD("tagreader", "Found Home Assistant tag NDEF");
id(source)="hass";
id(url)=payload;
id(info)=payload.substr(hass + 34);
}
else if (type == "U" and applemusic != std::string::npos ) {
ESP_LOGD("tagreader", "Found Apple Music tag NDEF");
id(source)="amusic";
id(url)=payload;
}
else if (type == "U" and spotify != std::string::npos ) {
ESP_LOGD("tagreader", "Found Spotify tag NDEF");
id(source)="spotify";
id(url)=payload;
}
else if (type == "U" and sonos != std::string::npos ) {
ESP_LOGD("tagreader", "Found Sonos app tag NDEF");
id(source)="sonos";
id(url)=payload;
}
else if (type == "U" && (mass_deezer != std::string::npos ||
mass_filesystem_local != std::string::npos ||
mass_filesystem_smb != std::string::npos ||
mass_plex != std::string::npos ||
mass_qobuz != std::string::npos ||
mass_radiobrowser != std::string::npos ||
mass_soundcloud != std::string::npos ||
mass_spotify != std::string::npos ||
mass_tidal != std::string::npos ||
mass_tunein != std::string::npos ||
mass_ytmusic != std::string::npos)) {
ESP_LOGD("tagreader", "Found Music Assistant tag NDEF");
id(source) = "mass";
id(url) = payload;
}
else if (type == "T" ) {
ESP_LOGD("tagreader", "Found music info tag NDEF");
id(info)=payload;
}
else if ( id(source)=="" ) {
id(source)="uid";
}
}
}
else {
id(source)="uid";
}
- if:
condition:
lambda: 'return ( id(source)=="uid" );'
then:
- homeassistant.tag_scanned: !lambda |-
ESP_LOGD("tagreader", "No HA NDEF, using UID");
return x;
else:
- if:
condition:
lambda: 'return ( id(source)=="hass" );'
then:
- homeassistant.tag_scanned: !lambda 'return id(info);'
else:
- homeassistant.event:
event: esphome.music_tag
data:
reader: !lambda |-
return App.get_name().c_str();
source: !lambda |-
return id(source);
url: !lambda |-
return id(url);
info: !lambda |-
return id(info);
- if:
condition:
switch.is_on: buzzer_enabled
then:
- rtttl.play: "success:d=24,o=5,b=100:c,g,b"
on_tag_removed:
then:
- homeassistant.event:
event: esphome.tag_removed
# Define the buzzer output
output:
- platform: esp8266_pwm
pin: 3
id: buzzer
binary_sensor:
- platform: status
name: "${friendly_name} Status"
entity_category: diagnostic
text_sensor:
- platform: version
hide_timestamp: true
name: "${friendly_name} ESPHome Version"
entity_category: diagnostic
- platform: wifi_info
ip_address:
name: "${friendly_name} IP Address"
icon: mdi:wifi
entity_category: diagnostic
ssid:
name: "${friendly_name} Connected SSID"
icon: mdi:wifi-strength-2
entity_category: diagnostic
# Define buzzer as output for RTTTL
rtttl:
output: buzzer
# Configure LED
#light:
#- platform: neopixelbus
# variant: WS2812
# pin: 7
# num_leds: 1
# flash_transition_length: 500ms
# type: GRB
# id: activity_led
# name: "${friendly_name} LED"
# restore_mode: ALWAYS_OFF
And Buzzer seems not working, but it’s not my priority