I set up an esp8266-based device using the ESPHome wizard and successfully flashed it. When I go to Configurations -> Integrations, ESPHome displays and shows “1 device” but no entities. I am trying to control one of the GPIO pins on the device, so my ESPHome yaml file (/config/esphome/relay.yaml) includes the original boilerplate plus
switch:
platform: gpio
name: “Pin_13”
pin: 13
The Pin_13 switch is not shown in the list of entities and is not displayed in the Overview. I have tried restarting my Home Assistant Rpi and the esp board, to no avail. Any ideas how I can control this pin from HA?
Welcome to the community by the way, I see that was your 1st post.
Did you recompile & upload the firmware to the esp after adding the switch to the yaml file? Clicking upload in the GUI should compile new firmware and upload it over the air (OTA).
Where can I find the “boot” logs to answer you question? Thank you so much for trying to help me. My project is to use HA and the esp8266 to control a sprinkler on a roof cooling system by getting a weather forecast and setting start and stop times based on the forecast.
In the esphome integration hamburger menu, system options, do you have ‘enable newly added entities’ turned on? You can also use the HA entity browser to find hidden entities (configuration/entities/hamburger menu/check show hidden and unavailable entities).
Enable newly added entities is turned on. The HA entity browser does not show the esp8266 pin, despite having disabled and unavailable entities checked…
I just discovered that when I click on the “Show logs” button in the ESPHome dashboard, I get perpetual connection failures. But the OTA uploading works fine and the esp8266 has an IP address and is pingable, so how can the connection fail?
INFO Reading configuration /config/esphome/relay.yaml...
INFO Starting log output from relay.local using esphome API
INFO Connecting to relay.local:6053 (192.168.1.19)
WARNING Initial connection failed. The ESP might not be connected to WiFi yet (Invalid password!). Re-Trying in 1 seconds
...
That’s odd, as the logs you posted earlier show a successful connection. What’s changed since then?
This smells like a networking problem.
Do you have an “advanced” network setup with VLANs or other subnets? (you’ll know if you do)
What is the IP of the machine running the ESPHome dashboard?
Are you certain there’s no other device also using 192.168.1.19, or with a hostname of relay?
Perhaps set a static IP in your YAML, outside your router’s DHCP range. For example, my router gives out 192.168.1.100–254 as DHCP addresses, and everything up to .100 are static IP devices that I have configured.
There is no API password in your YAML. Make sure you’re not using one in your dashboard.
This morning when I checked the overview there was the pin and lo and behold I could switch the led I had connected! It’s troubling in a way since I had not made any changes from the evening before when it was not showing. Hopefully this was a one-time issue. So now I am on to figuring out how to grab the next day’s min and max temperature forecast from OpenWeatherMap and use it in an automation. I really appreciate everyone taking the time to try and help me. This seems like a wonderful community!
I am having similar issue and struggling since few days like nuts, my esphome 8266 nodemcu is perfectly fine, it shows online, it also has password , it also has static ip, infact things are quite similar to my old esphome device, which works fine. suddenly entities stopped being discoverable.
there is a file i found under .storage> core.entity_registry , there earlier nodemcu esphome entities, or basically json objects are there, no new entries are getting added.
I had an issue with new entities not showing up but my experience was related to removing and renaming, I resolved it and got new entities to show up by removing the integration from the integration panel and the restarting the addon from Addons (what was supervisor). New entities were then discovered.
Sorry to resurrect an old thread, but I wanted to add another possible cause for those who might stumble across this while googling.
For me the symptom in the title was caused by trying to use the button component with an older version of home assistant core. The documentation makes this incompatibility conspicuously clear, but I had missed it the first time through.
Just wanted to add that I had the same issue. It was working fine in the logs and running the webserver from ESPhome. When I finally added it to Home Assistant it only showed the Firmware was up to date. I had tried flashing the device several times, connected to pc and Ota, and nothing worked.
After I found this post, I removed only the Button code and re-flashed. IT WORKED! All my sensors and switches showed up in Home Assistant. After that I added the Button code back and flashed again and it is still working now with the button in Home Assistant. Kind of an odd bug, but at least it works now.