diff --git a/docs/linux-voice-assistant-2mic-install.md b/docs/linux-voice-assistant-2mic-install.md
index fc41556..8eebedd 100644
--- a/docs/linux-voice-assistant-2mic-install.md
+++ b/docs/linux-voice-assistant-2mic-install.md
@@ -25,7 +25,8 @@ This guide reproduces a working setup of the **linux-voice-assistant** project w
```bash
sudo apt update
sudo apt upgrade
-sudo apt install libportaudio2 build-essential git libmpv-dev mpv python3.11-dev
+sudo apt install libportaudio2 build-essential git \
+ libmpv-dev mpv python3.11-dev avahi-daemon avahi-utils
sudo reboot
```
@@ -82,6 +83,19 @@ aplay -l
## 7. Systemd services
+### (Optional) enable Avahi service file to advertise LVA to HA:
+
+```bash
+chmod +x ~/linux-voice-assistant/script/gen-esphome-avahi.sh
+sudo ~/linux-voice-assistant/script/gen-esphome-avahi.sh
+sudo mkdir -p /etc/systemd/system/linux-voice-assistant.service.d
+sudo cp ~/linux-voice-assistant/service/10-avahi.conf sudo mkdir -p /etc/systemd/system/linux-voice-assistant.service.d/10-avahi.conf
+```
+
+```bash
+sudo systemctl restart avahi-daemon.service
+```
+
### (Optional) for Pulse Audio with OWW copy this service file into /etc/systemd/system/:
```bash
@@ -145,6 +159,8 @@ sudo systemctl status linux-voice-assistant wyoming-openwakeword --no-pager -l
## 8. Connect to Home Assistant
+### If HA does not discover the new LVA:
+
1. In Home Assistant, go to "Settings" -> "Device & services"
2. Click the "Add integration" button
3. Choose "ESPHome" and then "Set up another instance of ESPHome"
diff --git a/script/gen-esphome-avahi.sh b/script/gen-esphome-avahi.sh
new file mode 100644
index 0000000..0600c23
--- /dev/null
+++ b/script/gen-esphome-avahi.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+set -euo pipefail
+PORT=6053
+NAME="%h (Linux Voice Assistant)"
+
+mapfile -t IFACES < <(ip -o link show up | awk -F': ' '{print $2}' | grep -v '^lo$')
+
+TXT=" platform=linux
+"
+LIST=""
+for i in "${IFACES[@]}"; do
+ mac=$(cat "/sys/class/net/$i/address")
+ if [ -d "/sys/class/net/$i/wireless" ] || [[ $i == wl* ]]; then net=wifi; else net=ethernet; fi
+ TXT+=" mac_${i}=${mac}
+"
+ TXT+=" net_${i}=${net}
+"
+ LIST+="${i},"
+done
+LIST=${LIST%,}
+
+cat >/etc/avahi/services/esphome-lva.service <
+
+
+ ${NAME}
+
+ _esphomelib._tcp
+ ${PORT}
+ ifaces=${LIST}
+${TXT}
+
+XML
diff --git a/service/10-avahi.conf b/service/10-avahi.conf
new file mode 100644
index 0000000..dc5ca11
--- /dev/null
+++ b/service/10-avahi.conf
@@ -0,0 +1,3 @@
+[Unit]
+Wants=avahi-daemon.service
+After=avahi-daemon.service