From c9091cbefc253a5ec61cf07424511296dc4814aa Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 26 Nov 2023 10:12:29 -0600 Subject: [PATCH] Avoid closing the churning zeroconf instances in the host resolver (#730) --- aioesphomeapi/log_reader.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aioesphomeapi/log_reader.py b/aioesphomeapi/log_reader.py index 507a499..cc197c4 100644 --- a/aioesphomeapi/log_reader.py +++ b/aioesphomeapi/log_reader.py @@ -39,7 +39,10 @@ async def main(argv: list[str]) -> None: time_ = datetime.now() message: bytes = msg.message text = message.decode("utf8", "backslashreplace") - print(f"[{time_.hour:02}:{time_.minute:02}:{time_.second:02}]{text}") + nanoseconds = time_.microsecond // 1000 + print( + f"[{time_.hour:02}:{time_.minute:02}:{time_.second:02}.{nanoseconds:03}]{text}" + ) stop = await async_run(cli, on_log) try: