mDNS 组件
mdns 组件使节点能够使用多播 DNS(mDNS)协议在本地网络中通告自身。
Home Assistant 和 ESPHome 仪表盘都使用 mDNS 来识别网络上所有 ESPHome 节点的 IP 地址。 如果 mDNS 被禁用,它们将无法再自动找到你的设备。那时可能需要在所有节点上使用静态 IP,并在 Home Assistant 应用中启用 ping 选项。
建议保持启用 mDNS。
# 示例配置条目mdns: disabled: false可以添加 esphome 节点所暴露的额外 mdns 服务。
# 带有额外服务的示例配置条目mdns: services: - service: "_custom_service" protocol: "_tcp" port: 8080 txt: txt_key_1: txt_value_1