HTTP Device with auth Bearer Token
Posted: 18 Jan 2024 23:17
Hello,
i am trying to create a device which get its values from Home Assistant.
So I tried to use the HTTP Device and Virtual Device (Javascript) but i just not skilled enough to get the value via the RESTful API of Home Assistant.
The URL i like to read is
but it need the Bearer token in the header of the request to access.
Who would the URL or the code (Javascript) would look like to get access?
Thanks in advance.
Regards Max
i am trying to create a device which get its values from Home Assistant.
So I tried to use the HTTP Device and Virtual Device (Javascript) but i just not skilled enough to get the value via the RESTful API of Home Assistant.
The URL i like to read is
Code: Select all
http://192.168.111.17:8123/api/states/sensor.temperature
Code: Select all
headers: {
'Authorization': 'Bearer <token>'
}
Thanks in advance.
Regards Max