How to create a custom HA addon with a card on the dashboard

Hi!

I am trying to create a simple HA addon that creates a card on the dashboard. The API I am going against is a very simple REST which I would like to communicate against. But I cannot find any simple tutorials on how to do this or any simple example?

Does anyone have any good documentation or a simple example where one REST request and from the response populate a card on the dashboard with the result data?

Thanks in advance!
Best regards Max

Just to help, i think you are talking about a component. An addon in HA is something else and is a docker container running an application that hooks into HA.

There is developer documentation here.

However, if it is just a single rest call to return data to display on your HA dashboard, then writing a component is probably overkill. Have a look at the rest sensor here.

1 Like

The correct word would probably be an integration and not component, but your concept of the workings in HA seems a bit flawed.

There are two types of integrations in HA, one is the state machine integration and the other is the frontend integration.
The state machine integration gathers values from sensors or external sites or whatever and publish them to the HA state machine.
The frontend integration provides a card to present data in certain ways and maybe also do some interacting with the state machines through service calls, like a graph or bar or button.
There is no direct link between the two as such.

You can make your state machine integration to get values into HA and then the users can do with those data as they see fit. You can then also provide a frontend integration, so users can install the card and use that to represent your data, but some might just go their own way with representation.
Start with the state machine integration and see if the front integration part is necessary at all.

1 Like

Ah okej, thanks! I am very new to Home Assistant, I dont really use it actually, but I have created an IoT device which can communicate with Sungrow inverters, and I have created an Android application, iOS application and a Homey Pro integration currently and will try to make my best version of this HA integration too :slight_smile:. Then Ill try to attack Google Home SDK. :slight_smile:

All the integrations for Home Automation I make OpenSource on GitHub and the API to the cloud server is OpenAPI, so that everyone can make their own integrations if they want :slight_smile:

But thanks for the help! Its really appriciated!

Sounds great and I bet someone will be following your project, because we for sure have SunGrow users with HA here. :slight_smile:

Have a look at this github-repo
It sounds like what you want to accomplice