Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
fix forgotten renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhaus committed Jul 15, 2021
1 parent b4d9557 commit fea9c83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions deebotozmo/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ def __init__(self, refresh_interval: int, refresh_function: Callable[[], Awaitab
super().__init__(refresh_function)
self._refresh_task: Optional[Task] = None
self._refresh_interval: int = refresh_interval
self._state: Optional[VacuumState] = vacuum_bot.vacuum_status
self._status: Optional[VacuumState] = vacuum_bot.status

async def on_status(event: StatusEvent):
self._state = event.state
self._status = event.state
if event.state == VacuumState.STATE_CLEANING:
self._start_refresh_task()
else:
Expand All @@ -177,7 +177,7 @@ def _stop_refresh_task(self):

def subscribe(self, callback: Callable[[T], Awaitable[None]]) -> EventListener[T]:
listener = super(PollingEventEmitter, self).subscribe(callback)
if self._state == VacuumState.STATE_CLEANING:
if self._status == VacuumState.STATE_CLEANING:
self._start_refresh_task()
return listener

Expand Down

0 comments on commit fea9c83

Please sign in to comment.