Skip to content

Commit

Permalink
Move where received_charge_points event is set.
Browse files Browse the repository at this point in the history
  • Loading branch information
Floris272 committed Mar 18, 2024
1 parent a094f7d commit 97b16b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bluecurrent_api/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ async def _message_handler(
return

if object_name == "CHARGE_POINTS":
self.received_charge_points.set()
handle_charge_points(message)
elif object_name == "CH_STATUS":
handle_status(message)
Expand All @@ -187,6 +186,9 @@ async def _message_handler(

await receiver(message)

if object_name == "CHARGE_POINTS":
self.received_charge_points.set()

async def _send(self, data: dict[str, Any]) -> None:
"""Send data to the websocket."""
if self.conn:
Expand Down

0 comments on commit 97b16b0

Please sign in to comment.