Getting Started with ESPHome: How to Install and Integrate it with Home Assistant?

Getting Started with ESPHome

ESPHome is a simple yet powerful system that allows users to control ESP boards using YAML configuration files. It allows users to quickly and easily build custom firmware for sensors and devices without any programming skills. ESPHome supports a long list of devices, sensors, and protocols that can be configured with just a few lines of YAML. Apart from that, it can also control lights, displays, and even more. It can be integrated with Home Assistant in few clicks.


There are mainly two methods for installing ESPHome. The quickest and easiest way is using the Home Assistant add-on, the second way is to install through python using pip. In this tutorial, we are going to install ESPHome through the Home Assistant add-on. Once the installation is complete, we will test it by controlling an LED and reading DHT11 sensor data. If you are not familiar with Home Assistant, follow our previous tutorial on Getting Started with Home Assistant. You can also check our previous tutorial on Flashing Tasmota on ESP8266-01.


Components Required for Installing ESPHome

  • ESP8266-01
  • Arduino Uno
  • LED
  • DHT11
  • Jumper Wires


Installing ESPHome

Installing the ESPHome through the ESPHome Home Assistant add-on is very easy. To install ESPHome, first, navigate to Home Assistant Web UI and from there navigate to the Supervisor panel, then search for ESPHome in the “Add-on Store” tab.

ESPHome Home Assistant


Open the ESPHome and then simply click on the Install button in order to install it. After that, wait until the add-on is installed. Then start the add-on and switch on the ‘Show in Sidebar’ option for ease of access. After that, click “Open Web UI”.

 Installing ESPHome


Now you will be redirected to ESPHome Web UI. Click on the “+” icon to add a new device.

ESPHome Web UI


In the first step, enter the device or project name. The device name must be in lowercase and must not contain any spaces. For example, my device name is ‘office_temperature’ but you can choose any name you like.

ESPHome Node Name


In the second step, select the correct board type. Here, I am using an ESP-01 Wi-Fi board so I selected ‘Generic ESP8266’.

ESPHome Device Type


Then in the next step, enter the SSID and password of the Wi-Fi network. You can also set an additional password for future OTA firmware updates.

ESPHome Wi-Fi and Updates


Once you have entered your credentials, click Next and then click Submit in the next step to finish the process, and the device will be added to the ESPHome UI. It will then ask to select a port. If you are using a Board that has a USB interface, connect it to Laptop and select the port; else ignore it.



Now to create a configuration for the ESP-01 device, click on ‘Edit’ from the menu of the device. You will be presented with the YAML file. If the YAML page is blank then click on ‘Overview’ or any other tab and then click back to ESPHome and click ‘Edit’ again. You will see a YAML file currently configured for your device.

ESP-01 Device Configuration


Now in the next step, we are going to add a light component (LED) and binary sensor (DHT11) in the configuration file. ESPHome has tons of compatible sensors and devices that you can find on their website. Add the below lines of code to the configuration file:

# Web server
  port: 80
    username: admin
    password: 312124dc
# Sensors config
  - platform: dht
    pin: GPIO0
    model: DHT11
      name: "Living Room Temperature"
      name: "Living Room Humidity"
    update_interval: 20s
  - platform: gpio
    pin: GPIO2
    id: main_relay
  - platform: binary
    name: "Lamp 1"
    id: rele1
    output: main_relay
  - platform: wifi_info
      name: espname ESP IP Address


Now go ahead and click save. Then click on three dots in the top right corner and then click 'Compile'.

ESPHome Compilation


The compilation process may take a while. Once the compilation completes successfully, click on ‘Download Binary.’

Install ESPHome


Note: If you are using a board with a USB interface, then you can directly upload the code from ESPHome UI by selecting the serial port but as we are using an ESP-01 board, we will use Arduino Uno to upload the firmware.


Flashing ESPHome on ESP-01

There are generally two methods for flashing ESPHome on ESP8266. One is Over the Air (OTA) and the other is using FTDI or Arduino Uno. In this project, we are going to use Arduino Uno.


Step1: Preparing Hardware

To flash a new firmware on ESP-01, connect ESP-01 with Arduino Uno as per the circuit diagram.

ESP-01 with Arduino Uno

Connect the VCC and GND of ESP-01 to 3.3V and GND of Arduino; also connect CH_PD to 3.3V andGPIO_0 to GND of Arduino. Connect RX and TX of ESP-01 to RX & TX of Arduino Uno respectively. GPIO_0 is grounded to enable the flashing mode of ESP8266-01. After making the circuit as per the diagram, connect the Reset pin of the Arduino to GND to bypass the Arduino. It will disable Arduino and upload the firmware directly to the ESP-01. Connect RST pin of ESP-01 to ground, remove the RST after half a second (the blue LED flashes for some millisecond).


Step 2: Download and install Tasmotizer

Tasmotizer is a specifically designed flashing tool for Tasmota but here we will use it to Flash ESPHome. Download the latest Tasmota version for your platform. After downloading, double click the downloaded file and it'll start, no installation is required.


Step3: Flashing the Firmware

Now in the final step, select the port to which Arduino Uno is connected. Then browse to the ESPHome firmware binary you downloaded. You can take a backup of your original firmware by checking in the “Save original firmware” option. Click Tasmotize! and wait until it is done.

Flashing the ESPHome Firmware

Once the Flashing is done, disconnect the RX, TX, CH_EN pins and connect an LED to GPIO2 and DHT11 to GPIO0 of ESP-01 as shown in the image given.


Wait until the ESP-01 connects to Wi-Fi and then click on Configuration to load the configuration page, then go to Integrations.

Home Assistant Configuration


Now on the Integrations page, you will see that Home Assistant has already discovered the ESPHome device.

ESPHome Device


If you didn’t turn on the Edit mode on your Dashboard, ESPHome will already be visible on the overview page, otherwise, add it manually.

ESPHome with Home Assistant


You can even access the ESPHome Web UI without Home Assistant. For that enter the IP address of ESP8266 into the browser URL and click Enter. It will ask you to enter the Username and Password that you provided in the configuration file.

ESPHome Web UI without Home Assistant


After entering the User name and Password, click on Sign in and you will be redirected to ESPHome Web UI.

ESPHome Web Server API

This is how you can integrate ESPHome with Home Assistant. It's that easy to add sensors and devices using ESPHome. A complete working video is given below. If you have any questions, please let me know in the comments below.



Just desire to say your article is as astounding. The clarity on your submit is simply excellent and that i can suppose you are an expert in this subject. Fine with your permission allow me to grasp your RSS feed to keep updated with coming near near post. Thanks one million and please continue the rewarding work.|

My wife and i ended up being absolutely thrilled when Emmanuel managed to carry out his survey through the entire ideas he got using your web pages. It's not at all simplistic just to find yourself giving away facts that the others may have been trying to sell. We realize we've got the website owner to be grateful to for that. Most of the explanations you've made, the easy blog navigation, the friendships your site help to engender - it is mostly impressive, and it is letting our son in addition to the family do think that content is exciting, which is extraordinarily mandatory. Thanks for the whole thing!

Good post. I study one thing more challenging on totally different blogs everyday. It's going to all the time be stimulating to learn content material from different writers and apply slightly something from their store. I抎 choose to use some with the content on my weblog whether or not you don抰 mind. Natually I抣l give you a link in your net blog. Thanks for sharing.

I just wanted to develop a small remark so as to appreciate you for the unique recommendations you are giving on this website. My considerable internet lookup has at the end of the day been honored with beneficial content to go over with my friends and classmates. I 'd point out that many of us website visitors are unequivocally blessed to live in a really good community with many outstanding professionals with very helpful plans. I feel very much privileged to have come across the web page and look forward to many more amazing times reading here. Thank you once more for all the details.

I intended to compose you that tiny remark to say thank you again for your amazing suggestions you've discussed here. This is simply particularly generous with people like you giving unhampered all that many of us could possibly have sold as an e-book in order to make some money for themselves, notably now that you could have done it if you considered necessary. Those basics likewise served as a good way to fully grasp that other individuals have the identical fervor just like my personal own to know more with reference to this matter. I think there are a lot more fun situations ahead for folks who scan your website.

A powerful share, I simply given this onto a colleague who was doing a little analysis on this. And he in actual fact bought me breakfast because I discovered it for him.. smile. So let me reword that: Thnx for the treat! However yeah Thnkx for spending the time to discuss this, I really feel strongly about it and love reading more on this topic. If possible, as you grow to be experience, would you thoughts updating your blog with more particulars? It's highly useful for me. Large thumb up for this weblog post!

I in addition to my guys were actually following the best suggestions found on your web site and then all of the sudden got a horrible feeling I never expressed respect to the web blog owner for those strategies. All of the guys happened to be as a result passionate to study all of them and now have undoubtedly been using these things. Many thanks for being quite considerate and for deciding on this kind of terrific information most people are really eager to learn about. Our own sincere regret for not expressing appreciation to sooner.

I precisely wanted to appreciate you once more. I'm not certain the things that I could possibly have accomplished without the methods contributed by you on such a question. This was an absolute fearsome circumstance in my opinion, however , being able to see the very expert technique you handled that made me to jump for delight. I am grateful for the assistance and even expect you comprehend what a powerful job you are always accomplishing teaching men and women with the aid of your website. Most likely you've never encountered any of us.

Needed to send you the little observation in order to say thanks yet again for your great tricks you have documented on this website. It was really particularly open-handed of you to give easily what exactly a number of people could have distributed as an ebook to generate some money on their own, especially given that you might have done it if you wanted. The inspiring ideas also acted as a easy way to fully grasp the rest have the same dreams just like my own to figure out a lot more with regards to this matter. I believe there are a lot more pleasurable instances up front for individuals that take a look at your site.

I definitely wanted to compose a note so as to express gratitude to you for some of the precious recommendations you are placing here. My time intensive internet research has now been paid with good quality facts and techniques to write about with my colleagues. I would repeat that we site visitors actually are undeniably blessed to be in a fine network with many perfect people with good strategies. I feel pretty fortunate to have seen your webpages and look forward to really more fun minutes reading here. Thank you once more for a lot of things.

I must point out my admiration for your kind-heartedness in support of men and women that have the need for help with this important topic. Your personal commitment to getting the solution all-around had been pretty advantageous and has frequently helped professionals like me to realize their ambitions. Your informative guide signifies much a person like me and additionally to my mates. Warm regards; from all of us.

Thanks a lot for providing individuals with an exceptionally spectacular possiblity to read articles and blog posts from this website. It is often very nice and also full of fun for me and my office friends to visit your website at the very least thrice in one week to learn the newest guides you will have. And lastly, we're at all times contented concerning the staggering ideas you give. Certain 1 points in this article are indeed the most effective we have had.

I抦 impressed, I need to say. Really rarely do I encounter a blog that抯 each educative and entertaining, and let me tell you, you have hit the nail on the head. Your concept is excellent; the issue is one thing that not sufficient individuals are talking intelligently about. I'm very completely happy that I stumbled across this in my search for something regarding this.

I just wanted to write down a brief message to be able to say thanks to you for some of the fantastic recommendations you are giving out at this website. My long internet research has at the end of the day been honored with useful details to talk about with my best friends. I would state that that many of us visitors actually are truly blessed to dwell in a superb network with so many brilliant people with insightful opinions. I feel very much lucky to have discovered your web site and look forward to plenty of more cool moments reading here. Thanks a lot again for everything.

My husband and i felt really ecstatic when Chris could conclude his web research through the ideas he got in your site. It is now and again perplexing to simply find yourself giving away things that the rest may have been trying to sell. We recognize we have got you to appreciate because of that. The explanations you've made, the simple website navigation, the relationships you make it possible to foster - it's mostly incredible, and it's assisting our son and our family feel that the subject matter is interesting, which is particularly fundamental. Many thanks for everything!

I am commenting to let you be aware of of the wonderful encounter my friend's daughter had reading through yuor web blog. She realized a good number of details, including how it is like to have an awesome giving character to make the mediocre ones without difficulty fully grasp a number of impossible issues. You undoubtedly did more than our desires. Thanks for showing such valuable, safe, informative and also easy guidance on your topic to Tanya.

I simply wanted to jot down a simple comment in order to express gratitude to you for some of the unique secrets you are showing here. My extended internet look up has at the end been recognized with reputable concept to exchange with my close friends. I would repeat that we readers are very much lucky to dwell in a fine network with many perfect professionals with useful tips. I feel rather grateful to have come across the website page and look forward to plenty of more awesome moments reading here. Thank you once more for everything.

My husband and i have been absolutely relieved when Albert could do his studies with the precious recommendations he received when using the site. It's not at all simplistic to just continually be freely giving techniques that the rest may have been making money from. And we all understand we now have the writer to thank because of that. The specific illustrations you made, the easy website menu, the relationships your site help instill - it's got many overwhelming, and it's letting our son in addition to us recognize that that theme is excellent, and that is exceptionally serious. Many thanks for all!

Thanks so much for providing individuals with a very brilliant opportunity to read critical reviews from this website. It can be so pleasing and stuffed with a lot of fun for me personally and my office peers to search your web site minimum thrice a week to find out the latest tips you will have. Of course, I am just usually satisfied concerning the perfect tricks served by you. Certain 2 facts in this posting are indeed the most impressive I've had.

There are actually a lot of particulars like that to take into consideration. That may be a great point to convey up. I supply the ideas above as basic inspiration but clearly there are questions like the one you convey up where a very powerful factor will be working in honest good faith. I don?t know if greatest practices have emerged round things like that, however I am certain that your job is clearly recognized as a good game. Both girls and boys really feel the impact of only a moment抯 pleasure, for the remainder of their lives.

Thank you for every one of your efforts on this website. My mom really loves managing research and it's simple to grasp why. Almost all know all relating to the dynamic method you make efficient techniques through this website and as well as inspire response from the others about this concern then my girl is undoubtedly learning so much. Take advantage of the rest of the new year. You are always doing a first class job.

Thanks for your whole labor on this web site. My daughter delights in making time for investigation and it's simple to grasp why. We know all concerning the compelling method you deliver informative things via your web blog and as well as invigorate response from some others on that point so our favorite simple princess is actually becoming educated so much. Enjoy the rest of the year. Your conducting a splendid job.

I wanted to type a simple note in order to say thanks to you for these lovely hints you are posting on this site. My rather long internet search has at the end of the day been paid with really good information to go over with my best friends. I would mention that many of us website visitors are unequivocally endowed to live in a wonderful site with so many brilliant professionals with valuable basics. I feel quite grateful to have seen your web site and look forward to really more cool minutes reading here. Thanks once again for a lot of things.

I抦 impressed, I have to say. Really rarely do I encounter a blog that抯 each educative and entertaining, and let me inform you, you've hit the nail on the head. Your concept is outstanding; the difficulty is something that not enough individuals are talking intelligently about. I'm very glad that I stumbled across this in my search for something referring to this.

I want to express my thanks to this writer for bailing me out of this trouble. After looking out through the the web and obtaining thoughts which are not beneficial, I figured my entire life was over. Being alive devoid of the approaches to the problems you have fixed all through your main review is a crucial case, as well as the kind which may have in a negative way affected my career if I had not encountered your web page. Your actual know-how and kindness in taking care of every item was excellent. I don't know what I would've done if I hadn't come upon such a solution like this. I am able to at this moment look ahead to my future. Thanks a lot very much for your specialized and amazing help. I won't be reluctant to suggest your web blog to any person who needs to have guidance on this area.

I definitely wanted to write a small comment to appreciate you for the amazing tips you are placing on this website. My long internet research has finally been paid with useful insight to go over with my close friends. I 'd say that most of us visitors actually are really blessed to exist in a notable website with many special professionals with interesting tactics. I feel very fortunate to have come across your entire web pages and look forward to so many more cool times reading here. Thanks once more for all the details.

I'm commenting to let you be aware of what a outstanding encounter my wife's daughter gained reading the blog. She even learned lots of issues, which include how it is like to have an awesome teaching character to get many others with ease know precisely several multifaceted subject matter. You truly did more than our expectations. Thanks for supplying such priceless, trusted, revealing as well as unique tips on the topic to Lizeth.

Thank you a lot for giving everyone a very terrific opportunity to read critical reviews from this website. It really is very enjoyable and full of fun for me personally and my office peers to search the blog at least thrice in 7 days to find out the newest issues you have. And lastly, I am also always fascinated with the stunning principles you give. Some two points in this post are completely the most suitable we have all had.

I'm commenting to make you know of the impressive discovery my wife's girl found going through your blog. She learned so many things, with the inclusion of what it is like to have a very effective teaching style to have the others quite simply learn certain tricky issues. You really did more than our expectations. Many thanks for producing the helpful, trustworthy, edifying and also cool tips about your topic to Ethel.

I抦 impressed, I must say. Really hardly ever do I encounter a weblog that抯 both educative and entertaining, and let me let you know, you could have hit the nail on the head. Your concept is excellent; the difficulty is something that not sufficient persons are speaking intelligently about. I am very blissful that I stumbled throughout this in my seek for one thing relating to this.

My husband and i were quite more than happy that Edward could deal with his reports with the precious recommendations he made out of the web page. It's not at all simplistic to just find yourself offering methods which a number of people may have been making money from. And now we do know we now have the blog owner to be grateful to for that. The type of explanations you've made, the simple web site menu, the friendships you can make it possible to instill - it is mostly wonderful, and it's helping our son in addition to us reason why the topic is entertaining, and that is wonderfully vital. Thanks for everything!

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.