This commit is contained in:
Mateusz Gruszczyński committed 2026-09-21 11:30:36 +02:00
1 parent f6269024bb
commit 3b969c8754
15 files changed
+71 -49

No files matched your search

+2 -6
View File
@@ -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": [],