v0.14.21
This commit is contained in:
@@ -129,7 +129,9 @@ pub async fn test_connection(
|
||||
settings: &HomeAssistantSettings,
|
||||
) -> Result<Option<Value>> {
|
||||
let (mut base, token) = connection(settings)?;
|
||||
base = base.join("api/").context("cannot build Home Assistant API URL")?;
|
||||
base = base
|
||||
.join("api/")
|
||||
.context("cannot build Home Assistant API URL")?;
|
||||
let response = request_client(default_client, settings)?
|
||||
.get(base)
|
||||
.bearer_auth(token.trim())
|
||||
@@ -323,7 +325,9 @@ pub async fn list_entities(
|
||||
settings: &HomeAssistantSettings,
|
||||
) -> Result<Vec<Value>> {
|
||||
let (mut base, token) = connection(settings)?;
|
||||
base = base.join("api/states").context("cannot build Home Assistant API URL")?;
|
||||
base = base
|
||||
.join("api/states")
|
||||
.context("cannot build Home Assistant API URL")?;
|
||||
let response = request_client(default_client, settings)?
|
||||
.get(base)
|
||||
.bearer_auth(token.trim())
|
||||
|
||||
Reference in New Issue
Block a user