Problem ESPHome and new devices

Hello, I have the following problem: I can’t add new devices to ESP Home or flash the ESP. Whenever I click on “New Device,” the initializing circle spins and freezes. Can someone help me? Home Assistant and the add-on are up to date. I can connect to the ESP via the web ESP Home. Please help. Regards, Thorsten

Clear the browser cache. (Ctrl-F5)
Try restarting the ESPHome add-on.
Try restarting Home Assistant.

all these options doesnt works

You have to check esphome / ha logs when it freezes and post relevant here.
No one can help you just based on this.

here is the Logfile, after stop esphome, clear browser cache and fresh restart esphome, then klick on new device…

[17:51:40] INFO: e[32mStarting ESPHome dashboard…e[0m
[17:51:40] INFO: e[32mWaiting for ESPHome dashboard to come up…e[0m
2025-04-14 17:51:40,451 INFO Starting dashboard web server on unix socket /var/run/esphome.sock and configuration dir /config/esphome…
[17:51:40] INFO: e[32mStarting NGINX…e[0m
[17:51:40] INFO: e[32mSuccessfully send discovery information to Home Assistant.e[0m
s6-rc: info: service discovery successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
2025-04-14 17:51:53,260 INFO 304 GET / (0.0.0.0) 13.90ms
2025-04-14 17:51:53,331 INFO 304 GET /devices (0.0.0.0) 1.46ms
2025-04-14 17:51:53,387 INFO 101 GET /compile (0.0.0.0) 0.68ms
2025-04-14 17:51:53,405 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/esp32cam.yaml’
2025-04-14 17:51:53,649 INFO Process exited with return code 2
2025-04-14 17:51:53,667 INFO 101 GET /compile (0.0.0.0) 0.63ms
2025-04-14 17:51:53,669 INFO Running command ‘esphome --dashboard compile --only-generate /config/esphome/thermohygro2.yaml’
2025-04-14 17:51:54,010 INFO Process exited with return code 2
2025-04-14 17:51:54,978 INFO 200 GET /static/js/esphome/c.CUDzk5Qo.js (0.0.0.0) 11.37ms
2025-04-14 17:51:54,993 ERROR Uncaught exception GET /secret_keys (0.0.0.0)
HTTPServerRequest(protocol=‘http’, host=‘homeassistant.local:8123’, method=‘GET’, uri=‘/secret_keys’, version=‘HTTP/1.1’, remote_ip=‘0.0.0.0’)
Traceback (most recent call last):
File “/esphome/esphome/yaml_util.py”, line 456, in _load_yaml_internal_with_type
return loader.get_single_data() or OrderedDict()
^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/yaml/constructor.py”, line 49, in get_single_data
node = self.get_single_node()
^^^^^^^^^^^^^^^^^^^^^^
File “yaml/_yaml.pyx”, line 674, in yaml._yaml.CParser.get_single_node
File “yaml/_yaml.pyx”, line 860, in yaml._yaml.CParser._parse_next_event
yaml.parser.ParserError: did not find expected
in “/config/esphome/secrets.yaml”, line 5, column 1

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/esphome/esphome/yaml_util.py”, line 394, in parse_yaml
return _load_yaml_internal_with_type(ESPHomeLoader, file_name, file_handle)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/esphome/esphome/yaml_util.py”, line 458, in _load_yaml_internal_with_type
raise EsphomeError(exc) from exc
esphome.core.EsphomeError: did not find expected
in “/config/esphome/secrets.yaml”, line 5, column 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/esphome/esphome/yaml_util.py”, line 456, in _load_yaml_internal_with_type
return loader.get_single_data() or OrderedDict()
^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/yaml/constructor.py”, line 49, in get_single_data
node = self.get_single_node()
^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/yaml/composer.py”, line 39, in get_single_node
if not self.check_event(StreamEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/yaml/parser.py”, line 98, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File “/usr/local/lib/python3.11/dist-packages/yaml/parser.py”, line 171, in parse_document_start
raise ParserError(None, None,
yaml.parser.ParserError: expected ‘’, but found ‘’
in “/config/esphome/secrets.yaml”, line 5, column 1

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/lib/python3.11/dist-packages/tornado/web.py”, line 1788, in _execute
result = method(*self.path_args, **self.path_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/esphome/esphome/dashboard/web_server.py”, line 101, in decorator
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/esphome/esphome/dashboard/web_server.py”, line 1065, in get
secret_keys = list(yaml_util.load_yaml(filename, clear_secrets=False))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/esphome/esphome/yaml_util.py”, line 388, in load_yaml
return _load_yaml_internal(fname)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/esphome/esphome/yaml_util.py”, line 442, in _load_yaml_internal
return parse_yaml(fname, f_handle)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/esphome/esphome/yaml_util.py”, line 400, in parse_yaml
return _load_yaml_internal_with_type(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/esphome/esphome/yaml_util.py”, line 458, in _load_yaml_internal_with_type
raise EsphomeError(exc) from exc
esphome.core.EsphomeError: expected ‘’, but found ‘’
in “/config/esphome/secrets.yaml”, line 5, column 1
2025-04-14 17:51:54,998 ERROR 500 GET /secret_keys (0.0.0.0) 6.16ms
2025-04-14 17:51:58,406 INFO 304 GET /devices (0.0.0.0) 1.15ms
2025-04-14 17:52:04,398 INFO 304 GET /devices (0.0.0.0) 1.20ms
2025-04-14 17:52:09,531 INFO 304 GET /devices (0.0.0.0) 1.00ms
2025-04-14 17:52:14,599 INFO 304 GET /devices (0.0.0.0) 1.10ms
2025-04-14 17:52:19,739 INFO 304 GET /devices (0.0.0.0) 1.04ms
2025-04-14 17:52:24,755 INFO 304 GET /devices (0.0.0.0) 1.17ms
2025-04-14 17:52:29,765 INFO 304 GET /devices (0.0.0.0) 1.18ms
2025-04-14 17:52:34,867 INFO 304 GET /devices (0.0.0.0) 1.06ms
2025-04-14 17:52:39,987 INFO 304 GET /devices (0.0.0.0) 1.53ms

i’m not using haos but I think this might be your problem.
Probably you have misconfigured something in /esphome/secrets,yaml file.
Check your config

Really? Are you one of the 1% using HA CORE?

But you probably identified the problem.

@tottie78 - Try putting your WiFi credentials directly into the YAML file.

No, I’m using container.

Then you are running HAOS.

I dont think so.

not according to this thread:

HAOS runs on a real machine or a VM
Container runs in Docker on a real machine or VM

HAOS lets you add containers that it manages
You have to manage them yourself if you use the HA container image.

I use Docker and run HA as a container in it. It works but much of the documentation assumes (or appears to) you are running HAOS. It is mostly the same, but the differences are frustrating until you understand that they exist (backup for instance).

You’re right. Containers don’t include the Supervisor, meaning you have to manage updates and add-ons manually.

HAOS is a complete OS, but the confusion is that you can run HAOS in a Docker container.

I have always run HAOS bare-metal preferring to avoid the learning curve and added complexity of containers or virtual machines.

It is more complex to run haos then core in container. In haos you cant do much tweaking, cant use containers you want.
It is as it is, or wysiwyg os.
Containers give you fredom and flexibility in configuration to make everything the way you want.

HAOS is the majority of Home Assistant installations. It is the easiest and most efficient method of running Home Assistant. As for running stuff in containers, if it isn’t an add-on then I don’t need it on my HAOS host computer.

If you are familiar with containers and gotten past the steep learning curve, that’s fine. But I would never send a new user to ProxMox or Docker.

1 Like

Depending on what do you mean by running ha.

Windows is much easier to install then linux, but go and admin that rabbit hole called windows.

If something looks easier to do or run that doesn’t mean it is. Verly likely it isn’t. It is just simplified version that lacks some features that you will need tomorrow.
It is build like that on purpose to simplify things for majority.