I recently made a device with the use of an ESP8266 that allows me to communicate with HA. It works as expected, and I am able to send and reserve messages to and from the ESP.
The issue I am facing is that when the ESP is unplugged from power, HA remembers the last known state the ESP was in, rather than updating the front end to show that the device has gone offline like with my Sonoff switches do.
I have thought of using the Ping (ICMP) sensor to periodically ping my ESP to see if it is still online, but unfortunately, I do not know the HA configuration YAML syntax.
If anyone is able to help solve my problem, that would be awesome! (I have been trying to solve this issue for nearly a month, and I’m yet to find an answer on how to do this!)
It takes all the hard work out of developing ESP devices. Define devices with a simple yaml configureation file and it complies the binary for you. It supports MQTT or the home asistant API (much better unless you use deep sleep) and all of the common sensors and peripherals.
You didn’t actually have to include these lines as they are the default values, but it does not hurt and aids memorability for debugging when you come back to it years later.