v0.15.14
This commit is contained in:
1 parent
f6269024bb
commit
3b969c8754
15 files changed
+71
-49
No files matched your search
@@ -56,9 +56,7 @@ async fn list_home_assistant_entities(
|
||||
State(state): State<AppState>,
|
||||
) -> Result<Json<Value>, AppError> {
|
||||
let settings = state.settings.read().await.home_assistant.clone();
|
||||
if !home_assistant::token_configured(&settings)
|
||||
|| home_assistant::effective_url(&settings).trim().is_empty()
|
||||
{
|
||||
if !home_assistant::configured(&settings) {
|
||||
return Ok(Json(json!({
|
||||
"configured": false,
|
||||
"entities": [],
|
||||
@@ -165,9 +163,7 @@ async fn list_home_assistant_energy_sensors(
|
||||
State(state): State<AppState>,
|
||||
) -> Result<Json<Value>, AppError> {
|
||||
let settings = state.settings.read().await.home_assistant.clone();
|
||||
if !home_assistant::token_configured(&settings)
|
||||
|| home_assistant::effective_url(&settings).trim().is_empty()
|
||||
{
|
||||
if !home_assistant::configured(&settings) {
|
||||
return Ok(Json(json!({
|
||||
"configured": false,
|
||||
"sensors": [],
|
||||
|
||||
Reference in new issue
Block a user