We have a lot of text on the wiki on how to start with new integration.
However, the options are overwhelming and spiral quickly out of reach of newbies.
It would be great to have few templates, or examples, like “this is simple integration with just URL, this is where you provide your code and this is how you create sensor, button and select”.
Again, documentation is great and goes deep, but it’s very easy to get lost and not be able to produce something.
And the only video tutorial I can find for how-to for noobs was from Paulus from QUITE some time ago
I think this would be an excellent incentive to new contributions, great idea!
Hi,
Publishing tutorial and tip content is something HA encourages via the Creator Network:
https://partner.home-assistant.io/creators/
These independent channels get direct support from HA, so often publish the most relevant videos. The HA documentation already includes links to some of their vids.
Beyond that, I’d suggest Blueprints offer a lot to get new users up and working and are very close to your request.
There is a lot of information on this forum, so search first !
There is an Adding Integrations explainer/tutorial in the “Getting Started” section.
What changes or additions would you like to see to the existing tutorial to make it better?
Thanks for the replies.
Yes, I went through all the videos - but they only talk about ESPhome or already existing integrations.
And I tried to follow the “Adding integration” part on getting started, but got stuck pretty much at the start already - as I’ve mentioned above, it quickly spiraled to too many options and possible choices and I got nothing working out of it
I’m not sure we understand each other - I am not talking about adding a device or using blueprints for automations.
I am talking about adding new integration - I have heatpump where I know API calls, would like to make integration for it from scratch. I have air recuperation system, currently unsupported, would like to make integration for it, etc. Not how to use existing integrations or how to add devices based on existing integrations.
I am talking about simple templates for new integration - e.g.
- this template is for single URL input device with 1 error message, adding one sensor and one on/off switch
- this template is for device with URL, username and password, adding one sensor and one select-option
Should be pretty simple for experienced coder, but quite a nightmare for newbies as the developer’s docs go to excruciating detail (not complaining, it’s great, but for newbie really difficult).
Right, then the developer docs do indeed have a skeleton integration with a set of test harness scripts:
That said, depending on the heat pump API, you might be able to make calls with webhooks, MQTT or even ModBus.
THIS is what I was looking for! Thanks!
Thanks again a lot for this. The thing is - I’ve tried multiple times and always failed.
I follow the steps - I am able to build docker environment in VS code, I then run the python3 command and then end up with error
And when I asked on Discord, I failed to get answer. The container builds, but my “helios1” integration does not show up when I try to add it in the local container version of HA
I am 99.9% the problem is on my end, just can’t seem to get to the root of it.
I agree with this the documentation is hard to follow and I’ve been a software developer for 20+ years…
You have a page with “here is a minimal” required for an integration then it goes into using the scaffolding which is going from 1 right up to 11 in one jump.
Manifest page gives an example and then a minimal but then has a long list of other stuff - a table of fields with required or optional, and a link to the real detail would be nice here.
You then go to the platform section - which I think is probably where most integrations will need to work and it’s about 10 lines with a link to two examples - one a simple example with no comments another a best practice example - they both reference a setup_platform but it isn’t clear what I can and can’t do in that method.
They are also both polling examples rather than event driven examples so it’s hard to get your head around.
Another thing I can’t understand from the docs is it I have a “hub” that updates multiple entities what would I put in the entities update() method… should all the entities call the “hub” to update meaning it might get called more than necessary?
I end up needing to trawl through existing integrations - usually simple ones to try and figure out what should be done.
I’d contribute updates back but i’m not confident I have it right.