Skip to content

Commit

Permalink
fix(binary-sensor): Fixed issue when start/end time isn't set
Browse files Browse the repository at this point in the history
  • Loading branch information
BottlecapDave committed Sep 28, 2022
1 parent 4eda0a0 commit 7ab9b2d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/octopus_energy/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@ def is_on(self):
else:
all_rates = []

start_time = None
if CONFIG_TARGET_START_TIME in self._config:
start_time = self._config[CONFIG_TARGET_START_TIME]

end_time = None
if CONFIG_TARGET_END_TIME in self._config:
end_time = self._config[CONFIG_TARGET_END_TIME]

Expand Down

0 comments on commit 7ab9b2d

Please sign in to comment.