fix: v1.5.4 поправил автоматический сброс температуры если руками изменить в режиме авто
This commit is contained in:
+25
-13
@@ -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
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user