From d21836bf76f103b1b7fc3626a44d8936de9a8d46 Mon Sep 17 00:00:00 2001 From: Fedorov Dmitriy Date: Sun, 27 Sep 2026 21:57:09 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20v1.5.4=20=D0=BF=D0=BE=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D0=BB=20=D0=B0=D0=B2=D1=82=D0=BE=D0=BC=D0=B0=D1=82?= =?UTF-8?q?=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=B8=D0=B9=20=D1=81=D0=B1=D1=80?= =?UTF-8?q?=D0=BE=D1=81=20=D1=82=D0=B5=D0=BC=D0=BF=D0=B5=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D1=83=D1=80=D1=8B=20=D0=B5=D1=81=D0=BB=D0=B8=20=D1=80=D1=83?= =?UTF-8?q?=D0=BA=D0=B0=D0=BC=D0=B8=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=B2=20=D1=80=D0=B5=D0=B6=D0=B8=D0=BC=D0=B5=20?= =?UTF-8?q?=D0=B0=D0=B2=D1=82=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Version.toml | 4 ++-- app/api.py | 38 +++++++++++++++++++++++++------------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/Version.toml b/Version.toml index fbe88bb..f398acf 100644 --- a/Version.toml +++ b/Version.toml @@ -1,8 +1,8 @@ [version] major = 1 minor = 5 -patch = 3 +patch = 4 [build] date = "2026-09-27" -time = "21:35:33" +time = "21:55:47" diff --git a/app/api.py b/app/api.py index 6636560..e1e6b17 100644 --- a/app/api.py +++ b/app/api.py @@ -362,20 +362,32 @@ def get_status() -> dict: auto_controller .manual_target_temperature ) - elif ( - tion_status is not None - and schedule_service is not None - ): - resolution = schedule_service.resolve() + elif tion_status is not None: + schedule = schedule_service - if ( - resolution.enabled - and resolution.auto_active - and resolution.auto_target_temp is not None - ): - tion_status["target_temp"] = ( - resolution.auto_target_temp - ) + if schedule is not None: + # Ручной override имеет приоритет над AUTO. + if ( + schedule.override_active + and schedule.override_settings.target_temp + is not None + ): + tion_status["target_temp"] = ( + schedule.override_settings.target_temp + ) + + else: + resolution = schedule.resolve() + + if ( + resolution.enabled + and resolution.auto_active + and resolution.auto_target_temp + is not None + ): + tion_status["target_temp"] = ( + resolution.auto_target_temp + )