ESPHome device not showing up when discovered

I have a nodemcu BT device which is receiving and sharing the temperature and humidity measurements from some Xaomi room sensors. I originally installed it with ESPHome integral with Home Assistant, and everything was working. At some point, the information became unavailable, despite the device still being present. Reading other messages here suggested removing the device and letting it be re-discovered. This resolved the temperature and humidity reading issue, and now I have these values available and being updated. In the Configuration/Devices screen, the device is shown under ESPHome, but on the ESPHome screen it isn’t present. I had some other power meter devices with similar sensor reading issues - the remove/rediscover worked as expected in this case, and they are shown.
Has anyone else come across this issue? How do I add it to the ESPHome page again?

Thanks!

I am making some progress with understanding this. For some reason, the yaml file for the device is no longer in the esphome directory. The sub-directory is there, so I have no idea where the yaml file has gone. I do not have a copy, so unless I can track it down, I will have to recreate it.

Ok - a copy of the yaml file was under the esphome/.trash directory, so I copied this back to the esphome directory and everything is now back to working as expected.