Skip to content

Commit

Permalink
scheduler fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
magnuselden authored and magnuselden committed Jun 21, 2024
1 parent 0def7fd commit 9feabcf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/peaqev/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"iot_class": "calculated",
"issue_tracker": "https://github.com/elden1337/hass-peaq/issues",
"requirements": [
"peaqevcore==19.10.15"
"peaqevcore==19.10.23"
],
"version": "3.6.1b0"
}
2 changes: 2 additions & 0 deletions custom_components/peaqev/peaqservice/hub/price_aware_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def scheduler_options_handler(self) -> SchedulerOptionsHandler:
@property
def current_peak_dynamic(self):
"""Dynamically calculated peak to adhere to caution-hours"""
if self.hours.scheduler.active:
return self.sensors.current_peak.observed_peak
dynamic_caution_hours: dict = self._request_sensor_lookup().get(LookupKeys.DYNAMIC_CAUTION_HOURS, {})()
if len(dynamic_caution_hours) > 0:
if self.now_is_caution_hour() and not getattr(self.hours.timer, 'is_override', False):
Expand Down

0 comments on commit 9feabcf

Please sign in to comment.