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?
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.
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.
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 . Then Ill try to attack Google Home SDK.
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