At least one platform must be specified for 'ota'; add 'platform: esphome' for original OTA functionality

Getting this error on all my scripts since I just did a docker pull (not running in HA, just in docker) Is this a new thing? I can’t see any documentation on it.

1 Like

Breaking change coming, see here

If you search for ota on the ESPHome discord, there’s a discussion about it

This PR so far is in dev branch only, NOT implemented in release.
See no point to use dev branch while take no care to study changes in progress…
Just use release and read Release Notes.

You’re right, didn’t notice I pulled Dev container. Thanks.

Hello,

after updating to ESPHome 2024.6 I can’t wirelessly update my ESP components anymore. The log says:

"Failed config

At least one platform must be specified for ‘ota’; add ‘platform: esphome’ for original OTA functionality"

When I add ‘platform: esphome’ to the config it says

"Failed config

platform: [source /config/esphome/tagreader-193908.yaml:1]

Component not found: platform.
esphome"

What can I do?

Greets
Schlichi83

1 Like

Example configuration entry

ota:
  - platform: esphome

you don’t need to use safe_mode or password.

see here: ESPHome OTA Updates — ESPHome

14 Likes

Got the same error message as Holdesmate, went to update, impossible to make OTA.

( Sorry I’m really bad at both HA and even more Esphome) Sorry if it sounds like stupid question

Tried to add the line

  • platform: esphome

Into Esphome, and then install trough wireless update, but then I run into an other error “keyerror uart 0”



thanks, works great here…

I found that the sample configuration guidance provided above, and linked, was WRONG.

Follow guidance here - ESPHome 2024.6.0 - 19th June 2024 — ESPHome

there is no hypen before the platform entry (i.e., not like HA configuration YAML)

To quote from the the page I’ve linked:

You will need to change the configuration by adding a new line as below:

# Old
ota:

ota:
  password: "xxxx"

# New
ota:
  platform: esphome

ota:
  platform: esphome
  password: "xxxx"
4 Likes

Thank you! That did the trick. Hopefully they update the docs soon.

EDIT: Actually both work for me with or without hypen. As pointed out by @Troon

You can do it either way if you only have one entry, but you must use the hyphen (list) form if there is more than one entry (e.g. using esphome and http_request). All of my configs have the hyphen for consistency and are working fine.

ota:
  - platform: esphome
    password: "xxx"

is equivalent to {"ota":[{"platform":"esphome","password":"xxx"}]} (with a list), whereas:

ota:
  platform: esphome
  password: "xxx"

is equivalent to {"ota":{"platform":"esphome","password":"xxx"}} (without a list).

3 Likes

Thank you! Just tried, can confirm both work.

Adding that line fixed my error, thanks!

1 Like

I only use release branch from my entire HA instance and I still encountered this exact error when attempting to OTA an ESPHome device (that always updated successfully before). My ESPHome version: 2024.6.1.

You should have read that sentence until the end:

Yes, I see the note there now, but for future folks reading that solution: EVERYONE needs to make this manual change in their ESPHome config now… No relation to dev branch at this point.

Why must we always break things like this :sob: If it was the default previously why is it now all of a sudden not good enough to be the default… Great way to alienate your install base.

(oh, I had even installed this from the Bluetooth Proxy uploader, wasn’t even config I wrote myself…)

1 Like

Completely agree. Breaking changes like this are just silly and unnecessary

tl; dr: This is in release now: Heads up for Esphome 2024.6

I started this thread because I mistakenly used the dev container and I still see notifications. So if you are having this problem, read the release note or thread posted here.