How to install any Custom Component from GitHub in less than 5 minutes?
…using the Home Assistant Community Store (HACS)
Home Assistant is an open-source and very powerful Smart Home operating system. By virtue of its vast number of community add-ons (so-called “Custom Components”), Home Assistant becomes the Swiss army knife for home automation. In the following tutorial, I’ll walk you through the Home Assistant Community Store (HACS). In particular, I’ll show you how Custom Repositories in HACS allow you to install Custom Components that are only available on GitHub and not through Home Assistant or HACS by default.
Have you ever wanted your Smart Home to welcome you with your favourite podcast? Maybe you just want your holiday pictures on display while having your morning cup of coffee? No matter how crazy you want to go with your Smart Home applications, chances are that a Home Assistant community member has already come up with a Custom Component to get you covered.
But here’s the catch with Custom Components: By default, only a small number of Custom Components are ready to be installed directly from within Home Assistant (to check them out, go to Configuration > Integrations, hit the “+” sign at the bottom and browse through the list). Other Custom Components have been silently published on GitHub by members of the Home Assistant Community. You could download and manually add these Custom Components to your Home Assistant configuration, but fiddling with your Home Assistant configuration can quickly become messy. If you don’t want to mess with your configuration, the Home Assistant Community Store (HACS) will be your choice: with HACS, you can add Custom Components from anywhere on the web with just a single click. Follow me along to see how simple it is.
Before we can add new Custom Components to Home Assistant through HACS, we need to install HACS itself. If you haven’t installed HACS already, briefly head over to the official HACS website and follow their tutorial. In the meantime, I’ll wait here for you and grab a quick coffee …☕
Great, that was quick. Now that we have both HACS and Home Assistant up and running, it’s time to understand the two different concepts of how Custom Components are being treated in HACS:
Default Repositories
All Custom Components listed as aDefault Repository in HACS are just as easy to install as the Custom Components that come with Home Assistant by default. Under HACS > Integrations, you can browse through a vast list of Custom Components, all of which have been reviewed by members of the HACS community.
After you hit install, HACS automatically fetches the Custom Component and puts it’s source code under your Home Assistant configuration folder. All that’s left for you to do is to restart Home Assistant since it won’t otherwise recognise the new Custom Component (Configuration > Server Controls > Server Management > Restart). Once Home Assistant is back up and running, head over to Configuration > Integrations, type the name of the new Custom Component, and follow the configuration wizard.
Should you ever decide that you no longer want to use a particular Custom Component, HACS will manage the removal process for you and keep your Home Assistant configuration clean.
Custom Repositories
Custom Repositories make HACS an even more versatile tool for adding Custom Components to Home Assistant. With Custom Repositories, HACS connects directly to GitHub and allows you to install, manage, and remove Custom Components, even if they are not listed as a Default Repository in HACS. In fact, many members of the Home Assistant community only publish their Custom Components on GitHub and don’t list their work as a Default Repository in HACS or Home Assistant itself. I’ve even published a Custom Component myself to make activity data from Strava available in Home Assistant. Feel free to check it out (Link):
Everything you need to know for installing such a Custom Component through HACS is the Custom Component’s GitHub URL — that’s it! HACS will automatically put the Custom Component’s source code under your configuration folder, remind you when an update becomes available, and even clean up your configuration folder should you ever decide to remove the Component.
To configure a new Custom Repository in HACS, click on the three dots at the top right and select Custom repositories. Once you have the custom repository menu open, paste the Custom Component’s GitHub URL, select Integration, hit save, and wait a few seconds for HACS to fetch the Custom Component and put it’s source code under your Home Assistant configuration folder. Now restart Home Assistant (Configuration > Server Controls > Server Management > Restart) and once it is back up and running, head over to Configuration > Integrations, type the name of the new Custom Component, and follow the configuration wizard.
I this tutorial is helpful and allows you to add ever more custom functionality to your Smart Home.