Configure ESPHome in configuration.yaml

I would like to know if I can configure my ESPHome devices through HA’s configuration.yaml instead of adding each device through the UI.

My rationale for this, is I intend to create many ESPHome devices and I run HA in docker and my configuration in git. I like that I can start my docker-compose from any computer and it is all set up without any need to configure all my esphome devices manually.

My dream is to add this to configuration.yaml:

esphome:
  - kitchen_switch.local:6052
  - other_esp.local:6052
3 Likes

You only need to set them up once.

That’s not really the point. I’d like to be able to commit my configuration to git, and have everything set up.
Currently I’m able to check out git with my docker-compose.yaml and ha configurations and everything thing works. It doesn’t matter if my computer burns down, I’ll only lose history.
Even kodi I can set up via gui or via yaml (git commitable).
Then I discovered esphome. Only gui. No yaml. Otherwise seems absolutely perfect.
Maybe I’ll hack away on esphome component then.

Just commit .storage to github.

1 Like

All of your esphome devices are saved in yaml. Mine are in /config/esphome. Git commit that folder if it is the same for you and you are good to go

Hello,

I agree with abbe, it would be nice to add esphome devices via configuration.yaml. for example I need to readd them, if I change API password or API encryption key. and I have about 50 devices to re-add :slight_smile:

Ed

5 years later? Necro of the month!

:slight_smile: … 5 years, and option is still not there…

It wolud be nice to have!