This post is a tutorial to deploy a custom app on your Home-assistant setup, and sharing it with the community on HACS.
I started playing with home-assistant: I was searching for opensource software to control RGB lightbulb before buying some.
I installed it with a simple docker compose.
Just after the first launch, without any config, it was able to detect all compatible devices on my network, so I added them.
I created a repo for the dockerfile and subneeded folders like the config/ folder.
Dockerfile:
services:
homeassistant:
container_name: homeassistant
image: ghcr.io/home-assistant/home-assistant:stable
privileged: true
restart: unless-stopped
environment:
- TZ=Europe/Paris
volumes:
- /home/japoneris/path/to/config:/config
- /run/dbus:/run/dbus:ro
network_mode: host
There are plenty of core extensions you can add.
I was looking at weather forecasts: an easy case, no dependencies, no device needed.
There are several providers, most requiring an API key (which may require you to enter a credit card in some cases).
I finally found one without this need (France Météo), which worked well.
Outside of that, I have two favorite weather apps:
My goal was to create a component for Ventusky to see the process of building on a low‑risk project.
First, I downloaded the HTML page of Ventusky: all the information for my location was available—temperature, wind, humidity, hourly and daily data. I asked Claude Code to make a script to collect and format this information as JSON.
Everything OK.
Then, I asked claude to build the component and a javascript card for display. Both were done quickly, everything was functional. It created two repos:
custom_components/ventustky/ // for the core python script / logic
www/ventusky/ // For javascript card
The only file that needed a rework was the manifest.json (where claude sonnet wanted to be the codeowner XD).
So, in terms of writing, I cannot help, AI did everything, and did it well.
It will split your code into pieces and add the necessary async / await keywords whenever they are needed.
There are a few rules to follow:
domain and name keys first AND THEN alphabetical order (yes, modern json for human …)codeowner with an @, like @japonerisdocumentation: Set it up with https://github.com/<org/user>/<repository>/README.mdissue_tracker: Set it up with https://github.com/<org/user>/<repository>/issuesversion: of your app. Start with 0.0.1.Check my example that passed the test: Link to manifest.json
To add the component, it is very easy:
cd config
mkdir custom_components
mkdir www
Then, copy the ventusky folder from myproject/custom_components/ventusky into config/custom_components/. Do the same for the www folder.
Finally, try to add a new device and search for the name you gave in the manifest.
I started writing this article the 24th of February, beginning the process of publishing an icon on the official brand repository, saw that there were 200 pull requests waiting before mine.
Fortunately, my PR was rejected with the comment:
Check the new Home assistant version, you would only need to put the image in your repository without PR.
custom_components/
my_super_app/
brand/
icon.png
logo.png
I stopped my docker, pulled the new release, reloaded, and the icon showed up!
You can find the information about the new release here
Find the docker images here: Docker Hub: homeassistant repository
HACS is a kind of Play Store for non-official extensions. Their website is buggy (it crashed my firefox at least 3 times …).
To install, follow their steps here. For docker, it is easy. Get a shell on container, execute your script, and you are done.
docker ps # get the container ID
docker exec -it <containerID> bash
wget -O - https://get.hacs.xyz | bash -
Then restart the container by running docker compose restart.
Finally, configure HACS. Read their setup steps.
You want to share your integration with the community?
You need to prepare your repo for that.
In the repository that contains your custom_components/mydomainname/ folder, add the following items at the root:
README.md: Main project page, letting user know what it is abouthacs.json: Configuration fileOfficial documentation if needed
hacs.jsonBasic example: (See requirements)
{
"name": "ventusky",
"content_in_root": false
}
You need to configure two GitHub Actions in your repository.
Create the workflow directory:
mkdir .github/workflows
cd .github/workflows
Then create two files (the names are not important) ending with .yml or .yaml.
name: HACS Action
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
hacs:
name: HACS Action
runs-on: ubuntu-latest
steps:
- name: HACS Action
uses: hacs/action@22.5.0
with:
category: integration
name: Validate with hassfest
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "home-assistant/actions/hassfest@master"
Commit these files. After a push, go to the Actions tab on GitHub to see any errors.
The final step is to wait for your pull request to be accepted!
>> You can subscribe to my mailing list here for a monthly update. <<