Skip to content

Commit

Permalink
bug squash
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamillar committed Jan 4, 2025
1 parent 84100b1 commit 165aed2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions gw_spaceheat/actors/home_alone.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,15 +588,13 @@ async def join(self):
def process_message(self, message: Message) -> Result[bool, BaseException]:
match message.Payload:
case GoDormant():
if len(self.my_actuators) > 0:
if len(self.my_actuators()) > 0:
raise Exception("HomeAlone sent GoDormant with live actuators under it!")
if self.top_state != HomeAloneTopState.Dormant:
# Let normal home alone know it is dormant
self.trigger_normal_event(HomeAloneEvent.GoDormant)
# TopGoDormant: Normal/UsingBackupOnpeak -> Dormant
self.TopGoDormant()
if len(self.my_actuators()) > 0:
raise Exception("Home Alone only gets GoDormant message if it no longer has any actuators!")
self.top_state_update(cause=TopStateEvent.TopGoDormant)
case WakeUp():
if self.top_state == HomeAloneState.Dormant:
Expand Down

0 comments on commit 165aed2

Please sign in to comment.