ESPHome Issue: Component binary_sensor cannot be loaded via YAML (no CONFIG_SCHEMA)

I’ve been running ESPHome Add-On on my HAOS machine for quite a while now, but the error message in the title just started showing up out of nowhere recently when I wanted to update a few of my devices from version 2025.6.3 to 2025.7.3.
I had updated some devices to 2025.7.3 already when this issue suddenly showed up.

It doesn’t make a difference, if I want to choose the ‘Wirelessly’ or the ‘Manual download’ option.

I have since created this simplistic config

esphome:
  name: test-device

esp32:
  board: esp32dev

wifi:
  ssid: "dummy"
  password: "dummydummy"

logger:
  
api:

ota:
  platform: esphome

binary_sensor:
  platform: template
  name: "Test Sensor"
  lambda: |-
    return true;

and even this comes up with the same error message

INFO ESPHome 2025.7.5
INFO Reading configuration /config/esphome/aaa_dummy.yaml...
Failed config

binary_sensor: [source /config/esphome/aaa_dummy.yaml:19]
  
  Component binary_sensor cannot be loaded via YAML (no CONFIG_SCHEMA).
  platform: template
  name: Test Sensor
  lambda: return true;

I have uninstalled and reinstalled the add-on more times than I’m prepared to admit to and also rebooted the whole system to no avail.

I have no more ideas how to track down this issue - any suggestions?

First try a clean build (in the ellipsis menu bottom right of the device in builder), if that doesn’t work uninstall and re-install builder. You won’t lose any configs.

Thanks for the suggestions.

Clean Build didn’t help and

Well that’s a bummer because there is nothing wrong with your yaml and it compiles fine on the same ESPHome version.

I suggest you jump onto the ESPHome Discord and see if any of the devs have any idea.

You can easily try and see if it compiles ok with the old version using this add-on:

Legacy ESPHome versions repository

You can then compare Builder logs and see where it is going wrong (Not the compile logs - the ESPHome Builder logs).

Thanks!
I know it’s not an issue with the yaml code, that’s why I’m trying to fix the ESPHome Add-On itself.

I have a test machine where my configurations all work fine - they work there on 2025.7.3 and on 2025.7.5 as well - but I can’t adopt my devices there due to the fact that it’s not my production environment.

So I’m looking for a fix of the ESPHome setup on my production machine.

Looks like I finally found the issue.

While I selected the option “Also permanently delete this add-on’s data” during the uninstallation process, the esphome folder and its subfolders were not deleted - which is different from what I’d read and expected, and I did not notice it immediately when I reinstalled ESPHome again.

This meant that, of course, the subfolders were not deleted either.

One of these sub-folders, called custom_components contained an incorrect definition for a binary_sensor. As can be seen from the code above, this binary_sensor was not referenced in my minimalistic config, but it looks like just its sheer presence was enough to throw the whole process off track.

Here goes almost a whole day of tinkering that I’ll never get back :stuck_out_tongue_winking_eye: