From 6cb14e42f1741877ac0e667d3c0e0f86523cc4f3 Mon Sep 17 00:00:00 2001 From: Fedorov Dmitriy Date: Sun, 27 Sep 2026 22:16:22 +0300 Subject: [PATCH] =?UTF-8?q?work:=20=D0=BF=D0=BE=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D0=B1=D0=B0=D0=B3=20=D0=BE=D1=82=D0=BE=D0=B1?= =?UTF-8?q?=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=82=D0=B5=D0=BC?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B0=D1=82=D1=83=D1=80=D1=8B=2030=20=D0=B3?= =?UTF-8?q?=D1=80=D0=B0=D0=B4=20=D0=BF=D1=80=D0=B8=20=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D1=85=D0=BE=D0=B4=D0=B5=20=D0=BC=D0=B5=D0=B6=D0=B4=D1=83?= =?UTF-8?q?=20=D1=80=D0=B5=D0=B6=D0=B8=D0=BC=D0=B0=D0=BC=D0=B8.=20=D0=B2?= =?UTF-8?q?=20api.py=20=D0=B1=D1=8B=D0=BB=D0=B8=20=D0=BD=D0=B5=20=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D0=BD=D1=8B=D0=B5=20=D0=BE=D1=82=D1=81=D1=82=D1=83?= =?UTF-8?q?=D0=BF=D1=8B.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Version.toml | 4 ++-- app/api.py | 40 ++++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Version.toml b/Version.toml index a01d904..e061811 100644 --- a/Version.toml +++ b/Version.toml @@ -1,8 +1,8 @@ [version] major = 1 minor = 5 -patch = 5 +patch = 6 [build] date = "2026-09-27" -time = "22:09:12" +time = "22:15:49" diff --git a/app/api.py b/app/api.py index e1e6b17..9643d08 100644 --- a/app/api.py +++ b/app/api.py @@ -362,33 +362,33 @@ def get_status() -> dict: auto_controller .manual_target_temperature ) - elif tion_status is not None: - schedule = schedule_service + elif tion_status is not None: + schedule = schedule_service + + 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 schedule is not None: - # Ручной override имеет приоритет над AUTO. if ( - schedule.override_active - and schedule.override_settings.target_temp + resolution.enabled + and resolution.auto_active + and resolution.auto_target_temp is not None ): tion_status["target_temp"] = ( - schedule.override_settings.target_temp + resolution.auto_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 - ) - return {