ESP Home devices requesting 'Platform' Key

Just updated esphome and now I cant access the devices, error message:

INFO ESPHome 2024.6.1
INFO Reading configuration /config/esphome/cylinder-temp.yaml…
Failed config

ota.unknown: [source /config/esphome/cylinder-temp.yaml:27]

‘ota’ requires a ‘platform’ key but it was not specified.

Any idea how to add the required platform key to resolve my issue please

1 Like

It’s in the docs (the requirement has changed):

Because of this breaking change mentioned in the release notes:

Though the release notes do not make very clear what is needed. But the error does.

1 Like

Many thanks for the swift replies, to experienced users the instructions are ‘noddy proof’, but after reading, for me the simplest is to flatten the ESP device and restart.

Here, read this in case it helps. Someone has already gone through the trouble of creating simple instructions and pinned the post so others would find it.

Thanks for your contribution @nickrout

5 Likes

Thanks for the info to the guide, it worked which is great, I was adding the platform detail before the password as per the ESP OTA config, but it didn’t like it, anyhoo it works now.

Thanks for you help, much appreciated.

The order shouldn’t matter.

I had the same problem. Essentially, the “platform” key is missing. The easiest way is just to create a new device and compare the config YAML.

To make this super clear

change

ota: 
  password: !secret ota_password

to

ota:
  platform: esphome
  password: !secret ota_password
9 Likes

Hi.
I have tha same problem.
I have ‘ota’ requires a ‘platform’ key but it was not specified.

Whan I added platform key esphome, Validated is ok, but new problem is:

INFO ESPHome 2024.11.3
INFO Reading configuration /config/esphome/livingroom.yaml…
INFO Generating C++ source…
INFO Compiling app…
Processing livingroom (board: d1_mini; framework: arduino; platform: platformio/[email protected])

HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
Library Manager: Installing ESP8266WiFi
Warning! Could not find the package with ‘ESP8266WiFi’ requirements for your system ‘linux_aarch64’
Library Manager: Installing ESP8266mDNS
Warning! Could not find the package with ‘ESP8266mDNS’ requirements for your system ‘linux_aarch64’
Dependency Graph
|-- ESPAsyncTCP-esphome @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- DNSServer @ 1.1.0
|-- noise-c @ 0.1.6
Compiling .pioenvs/livingroom/src/esphome/components/api/api_connection.cpp.o
In file included from src/esphome/components/network/ip_address.h:16,
from src/esphome/components/network/util.h:5,
from src/esphome/components/api/api_connection.cpp:6:
/data/cache/platformio/packages/framework-arduinoespressif8266/cores/esp8266/Arduino.h:43:10: fatal error: core_esp8266_version.h: No such file or directory


  • Looking for core_esp8266_version.h dependency? Check our library registry!
  • CLI > platformio lib search “header:core_esp8266_version.h”
  • Web > PlatformIO Registry

43 | #include “core_esp8266_version.h”
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs/livingroom/src/esphome/components/api/api_connection.cpp.o] Error 1
========================= [FAILED] Took 13.80 seconds =========================

No yaml, what the heck do you want anyone to do?

I have just pressed ‘edit’ in esphome compiler, added key and pressed ‘save’.
What I do wrong?
Link ‘install’ was gone. I tried to press install in the … right menu.

No yaml, no issue.