764 shaares
94 liens privés
94 liens privés
REST API
Home Assistant provides a RESTful API on the same port as the web frontend. (default port is port 8123).
If you are not using the frontend in your setup then you need to add the api component to your configuration.yaml file.
http://IP_ADDRESS:8123/ is an interface to control Home Assistant.
http://IP_ADDRESS:8123/api/ is a RESTful API.
The API accepts and returns only JSON encoded objects.
All API calls have to be accompanied by the header Authorization: Bearer ABCDEFGH, where ABCDEFGH is replaced by your token. You can obtain a token ("Long-Lived Access Token") by logging into the frontend using a web browser, and going to your profile http://IP_ADDRESS:8123/profile.