Entity not available due to host changing into ip_address

I have an issue with my esphome devices. After a while of installing a few devices (around 12), I see that some of them go unavailable with a warning message on the dashboard ( Entity not available: {name of entity}). I have also noticed that this issue occurs concurrent with some devices in esphome integration overlap (such that when I click on a device name I see that it contains more than one device).

I manually install each device using the host as “device_name.local”. When I download the diagnostics of the devices I see that some devices retain the same host name I entered, and some of them change it into the ip_address. I have found that the problem only occurs for devices that change their host into the ip_address. Every device name/dns is unique, and every entity name in each device is unique as well.

I know that reloading a device from esphome integration can solve the problem, but I wish to use home assistant on a large scale for a personal project, and I wish to find a way to prevent the problem.

Please let me know if there is a way to prevent homeassistant from updating my devices host into ip_address on its own. Or if there is another solution to the problem (please help ;-;).

I had some problems a while ago with ESPHome and mDNS myself. As I didn’t want to look deeper into the problem, I solved it for myself by using “ping” to check for the devices in ESPHome, and I did change all my configs in ESPHome to not use mDNS and assigned fixed IP addresses.

Haven’t had a problem since, but it might not be, what you want. I personally like IP addresses in my local network, I don’t see any advantage in using mDNS. But that’s me, my setup doesn’t seem to be typical one, so maybe it’s for you as well. :slight_smile:

This is, what most of my configs look like:

  name: kitchen_refrigerator
  platform: ESP8266
  board: esp01_1m

  ssid: !secret esphome_ssid
  password: !secret esphome_wifi_pw
  disabled: true