v0.11.4-devices

This commit is contained in:
Mateusz Gruszczyński
2026-09-03 09:58:26 +02:00
parent 500516b0fd
commit f0909a443d
10 changed files with 635 additions and 43 deletions
+1 -1
View File
@@ -214,7 +214,7 @@ async fn command_device(State(state): State<AppState>, Path(id): Path<String>, J
async fn command_home_assistant_device(State(state): State<AppState>, Path(id): Path<String>, Json(command): Json<DeviceCommand>) -> Result<Json<Device>, AppError> {
if state.db.list_zones()?.iter().any(|zone| zone.device_id == id && !zone.enabled) {
return Err(AppError::BadRequest("device belongs to a disabled thermostat zone; use technical device control for manual operation".into()));
return Err(AppError::BadRequest("device belongs to a disabled thermostat zone; use Manual control in the web UI for explicit direct operation".into()));
}
Ok(Json(engine::send_manual_command(&state, &id, command, "home_assistant.device_manual_control").await?))
}