Skip to content

Commit

Permalink
Merge pull request #61 from Maik7/patch-1
Browse files Browse the repository at this point in the history
Update pv_excess_control.py
  • Loading branch information
InventoCasa committed May 15, 2024
2 parents a810425 + 56ae606 commit 932d7bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PV_Excess_Control/pyscript/pv_excess_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ def trigger_factory(self):
@time_trigger('period(now, 10s)')
def on_time():
# Sanity check
if not self.sanity_check():
if (not PvExcessControl.instances) or (not self.sanity_check()):
return on_time

# execute only if this the first instance of the dictionary (avoid two automations acting)
#log.info(f'{self.log_prefix} I am around.')
first_item = next(iter(PvExcessControl.instances.values()))
Expand Down

0 comments on commit 932d7bc

Please sign in to comment.