How do i build and test custom integration for HACS?

Hi,

I followed the steps here Local add-on testing | Home Assistant Developer Docs and got my devcontainer in vscode up and running with a test home assistant running at http://localhost:7123/.

I added a custom_components folder in the root directory and added all the necessary files as shown below.

I assumed that if I start the run the “start home assistant” task in vscode in the devcontainer, the custom_components directory will be copied to the home assistant root directory but when I checked using file editor, I don’t have it.

How do I got about testing this?

Appreciate any help.

Regards,
Allen

I dont build addons (yet) i build integrations, but its important to distinguish the two. Whereas integrations run inside HA’s container addons do not. But i highly recommend you test on a spin-up server of home assistant create a ha server on a virtual pc of home assistant

Upload your code to a git hub repo

then you add that repo on the addon store page

1 Like