mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-11-30 13:23:21 +01:00
try MessageToDict(msg)
This commit is contained in:
parent
265167279c
commit
14d0a2d8cf
@ -17,6 +17,7 @@ from typing import TYPE_CHECKING, Any, Callable
|
||||
import aiohappyeyeballs
|
||||
from async_interrupt import interrupt
|
||||
from google.protobuf import message
|
||||
from google.protobuf.json_format import MessageToDict
|
||||
|
||||
import aioesphomeapi.host_resolver as hr
|
||||
|
||||
@ -712,7 +713,10 @@ class APIConnection:
|
||||
if debug_enabled := self._debug_enabled:
|
||||
for msg in msgs:
|
||||
_LOGGER.debug(
|
||||
"%s: Sending %s: %r", self.log_name, type(msg).__name__, msg
|
||||
"%s: Sending %s: %s",
|
||||
self.log_name,
|
||||
type(msg).__name__,
|
||||
MessageToDict(msg),
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@ -908,10 +912,10 @@ class APIConnection:
|
||||
|
||||
if debug_enabled:
|
||||
_LOGGER.debug(
|
||||
"%s: Got message of type %s: %r",
|
||||
"%s: Got message of type %s: %s",
|
||||
self.log_name,
|
||||
msg_type.__name__,
|
||||
msg,
|
||||
MessageToDict(msg),
|
||||
)
|
||||
|
||||
if self._pong_timer is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user