Skip to content

Commit

Permalink
Add sleep delay in post connect (#164)
Browse files Browse the repository at this point in the history
Short delay added to avoid race condition with boot notification message on first connection/boot
  • Loading branch information
drc38 authored Sep 19, 2021
1 parent cb2cb44 commit 53fc0db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/ocpp/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ async def handle_data_transfer(call):

try:
self.status = STATE_OK
await asyncio.sleep(2)
await self.get_supported_features()
if prof.REM in self._attr_supported_features:
await self.trigger_status_notification()
Expand Down

0 comments on commit 53fc0db

Please sign in to comment.