work: Добавил команду для перехода в автоматический режим после установления скорости вручную
This commit is contained in:
+20
-1
@@ -697,4 +697,23 @@ async def set_light(
|
||||
ScheduledSettings(
|
||||
light=enabled,
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Переход в auto
|
||||
# ----------------------------------------------------------------------
|
||||
@app.post("/api/schedule/override/clear")
|
||||
async def clear_schedule_override():
|
||||
if schedule_service is None:
|
||||
raise HTTPException(
|
||||
status_code=503,
|
||||
detail="Schedule service unavailable",
|
||||
)
|
||||
|
||||
await schedule_service.clear_override()
|
||||
|
||||
return {
|
||||
"ok": True,
|
||||
"schedule": get_schedule_status(),
|
||||
"auto": get_auto_status(),
|
||||
}
|
||||
Reference in New Issue
Block a user