work: поправил автоматический сброс температуры если руками изменить в режиме авто

This commit is contained in:
2026-09-27 21:56:19 +03:00
parent 521e01bc92
commit 28ae6542fb
2 changed files with 27 additions and 15 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
[version] [version]
major = 1 major = 1
minor = 5 minor = 5
patch = 3 patch = 4
[build] [build]
date = "2026-09-27" date = "2026-09-27"
time = "21:35:33" time = "21:55:47"
+17 -5
View File
@@ -362,16 +362,28 @@ def get_status() -> dict:
auto_controller auto_controller
.manual_target_temperature .manual_target_temperature
) )
elif ( elif tion_status is not None:
tion_status is not None schedule = schedule_service
and schedule_service is not None
if schedule is not None:
# Ручной override имеет приоритет над AUTO.
if (
schedule.override_active
and schedule.override_settings.target_temp
is not None
): ):
resolution = schedule_service.resolve() tion_status["target_temp"] = (
schedule.override_settings.target_temp
)
else:
resolution = schedule.resolve()
if ( if (
resolution.enabled resolution.enabled
and resolution.auto_active and resolution.auto_active
and resolution.auto_target_temp is not None and resolution.auto_target_temp
is not None
): ):
tion_status["target_temp"] = ( tion_status["target_temp"] = (
resolution.auto_target_temp resolution.auto_target_temp