Skip to content

Commit

Permalink
misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
magnuselden authored and magnuselden committed Dec 14, 2023
1 parent 34f8d22 commit 5133765
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def current_offset(self, val) -> None:

@property
def current_tempdiff(self):
return get_tempdiff_inverted(self.current_offset, self._hvac.hub.sensors.get_tempdiff())
return get_tempdiff_inverted(self.current_offset, self._hvac.hub.sensors.get_tempdiff(), self._current_tolerances)

def get_current_offset(self) -> Tuple[int, bool]:
self._offsets = self._hvac.model.current_offset_dict_combined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ def _calculate_next_start(self, delay_dt=None, current_dm=None) -> tuple[datetim

if len(self.model.demand_hours):
required_delay = self.model.latest_boost + timedelta(hours=REQUIRED_DEMAND_DELAY)
loopstart = max(self.model.now_dt,
min(self.norm_dt(self.model.cold_limit), self.norm_dt(required_delay)))
loopstart = max(self.norm_dt(self.model.now_dt),min(self.norm_dt(self.model.cold_limit), self.norm_dt(required_delay)))
use_floating_mean = False
min_demand_hour = min(
(hour for hour in self.model.demand_hours if hour > max(loopstart, self.model.cold_limit)),
Expand Down

0 comments on commit 5133765

Please sign in to comment.