Skip to content

Commit

Permalink
test thread sync
Browse files Browse the repository at this point in the history
  • Loading branch information
grimmpp committed May 14, 2024
1 parent 8c671e0 commit 1967381
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/eltako/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from os.path import basename, normpath
import pytz
from datetime import datetime
from datetime import datetime, UTC

import serial
import asyncio
Expand Down Expand Up @@ -106,7 +106,7 @@ def set_last_message_received_handler(self, handler):
def _fire_last_message_received_event(self):
if self._last_message_received_handler:
asyncio.run_coroutine_threadsafe(
self._last_message_received_handler( datetime.now(datetime.UTC).replace(tzinfo=pytz.UTC) ),
self._last_message_received_handler( datetime.now(UTC).replace(tzinfo=pytz.UTC) ),
loop = self._loop
)

Expand Down

0 comments on commit 1967381

Please sign in to comment.