Trying to understand the development cycle

I want to try my hands on developing an Integration for a device I have in mind.
To get an idea what the entire development cycle involves, I thought I’d start with something simple: just change a string or something in an existing Integration, and get that to work.
My HA server runs on a Raspberry PI, and I’m developing on a Windows machine.
I think I got my VS code up and running (did the fork, and my DevContainer going).
I think I understand the ‘Submit’ your changes part of the documentation (all the git stuff, that gets everything back in my forked git repository).
Since my changes are in a Python module, there is no compile step involved.
But, and this is my question: I still need to build something (the OS image to copy to my Raspberry’s SD card!)
WHAT (and where, when, and how) do I build that image (and all other OS boot images)?
Can’t find that anywhere in the documentation.

Looking forward to any help with this! :wink:

I assume you are aware of the developers site which goes into the details of how to set up a local environment? On your Windows machine you can install HA in a virtual environment and run it right there from the command line to test your changes.

Another good practice is to run unit tests (or develop unit tests for the change you make). Again you can do this on your Windows machine from the command line.

Once you are convinced that everything is working fine you can create a pull request from your fork to the HA repository.

The above should work more many integrations. If you however, need to interact with a physical device that is also integrated in your production HA instance, then things might get a bit more complicated. But whereever possible I would recommend not to “develop in production”.

Thanks for your reply, much appreciated.
I am indeed aware of the developer site, as well as the developer documentation.

I may not have stated my question clearly enough, let me elaborate:
I did a fork of the official HA repository.
I made a minor modification to an Integration.
I do NOT want to mess with updating the official repo: I only want to work and test with my fork (for now).
After a unit test, I now want to do a complete install on a new Raspberry PI, creating a new SD boot disk with an image from my fork.
My question is: how do I create those OS boot images for my fork?

If you only want to make a small change to a core integration and test it locally do this:

Download and change the source of the integration.

Place the source folder in config/custom_components.

Add a manifest file with version number to the source folder.

Restart home assistant.

The version in the custom_components folder will be loaded in preference to the core version.

1 Like