Skip to content

Commit

Permalink
Preliminary fix for #88
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-r committed Sep 24, 2024
1 parent 05758ee commit b89bdf6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions custom_components/ohme/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ async def async_apply_session_rule(self, max_price=None, target_time=None, targe
pre_condition = self._last_rule['preconditioningEnabled'] if 'preconditioningEnabled' in self._last_rule else False

if pre_condition_length is None:
pre_condition_length = self._last_rule[
'preconditionLengthMins'] if 'preconditionLengthMins' in self._last_rule else 30
pre_condition_length = self._last_rule['preconditionLengthMins'] if ('preconditionLengthMins' in self._last_rule and self._last_rule['preconditionLengthMins'] is not None) else 30

if target_time is None:
# Default to 9am
Expand Down

0 comments on commit b89bdf6

Please sign in to comment.