mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
working on ashp recommendations
This commit is contained in:
parent
7ec795f5bb
commit
f21221d721
1 changed files with 21 additions and 4 deletions
|
|
@ -123,11 +123,28 @@ class Recommendations:
|
|||
self.heating_recommender.heating_recommendations or
|
||||
self.heating_recommender.heating_control_recommendations
|
||||
):
|
||||
if self.heating_recommender.heating_recommendations:
|
||||
property_recommendations.append(self.heating_recommender.heating_recommendations)
|
||||
|
||||
if self.heating_recommender.heating_control_recommendations:
|
||||
property_recommendations.append(self.heating_recommender.heating_control_recommendations)
|
||||
# We split into first and second phase recommendations
|
||||
first_phase_recommendations = [
|
||||
r for r in (
|
||||
self.heating_recommender.heating_recommendations +
|
||||
self.heating_recommender.heating_control_recommendations
|
||||
)
|
||||
if r["phase"] == phase
|
||||
]
|
||||
second_phase_recommendations = [
|
||||
r for r in (
|
||||
self.heating_recommender.heating_recommendations +
|
||||
self.heating_recommender.heating_control_recommendations
|
||||
)
|
||||
if r["phase"] == phase + 1
|
||||
]
|
||||
|
||||
if first_phase_recommendations:
|
||||
property_recommendations.append(first_phase_recommendations)
|
||||
|
||||
if second_phase_recommendations:
|
||||
property_recommendations.append(second_phase_recommendations)
|
||||
|
||||
# We check if we have distinct heating and heating controls recommendations
|
||||
# If so, we increment by 2 (one of the heating system, one for the heating controls)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue