Fix Bang & Olufsen WebSocket debug log and test (#131671)
* Fix test and debug message * Reorder dict orderpull/131680/head
parent
dc62ef8bef
commit
f04c50c59e
|
@ -204,13 +204,11 @@ class BangOlufsenWebsocket(BangOlufsenBase):
|
|||
|
||||
def on_all_notifications_raw(self, notification: BaseWebSocketResponse) -> None:
|
||||
"""Receive all notifications."""
|
||||
debug_notification = {
|
||||
"device_id": self._device.id,
|
||||
"serial_number": int(self._unique_id),
|
||||
**notification,
|
||||
}
|
||||
|
||||
_LOGGER.debug("%s", notification)
|
||||
self.hass.bus.async_fire(
|
||||
BANG_OLUFSEN_WEBSOCKET_EVENT,
|
||||
{
|
||||
"device_id": self._device.id,
|
||||
"serial_number": int(self._unique_id),
|
||||
**notification,
|
||||
},
|
||||
)
|
||||
_LOGGER.debug("%s", debug_notification)
|
||||
self.hass.bus.async_fire(BANG_OLUFSEN_WEBSOCKET_EVENT, debug_notification)
|
||||
|
|
|
@ -135,7 +135,6 @@ async def test_on_all_notifications_raw(
|
|||
},
|
||||
"eventType": "WebSocketEventVolume",
|
||||
}
|
||||
raw_notification_full = raw_notification
|
||||
|
||||
# Get device ID for the modified notification that is sent as an event and in the log
|
||||
assert mock_config_entry.unique_id
|
||||
|
@ -144,12 +143,11 @@ async def test_on_all_notifications_raw(
|
|||
identifiers={(DOMAIN, mock_config_entry.unique_id)}
|
||||
)
|
||||
)
|
||||
raw_notification_full.update(
|
||||
{
|
||||
"device_id": device.id,
|
||||
"serial_number": mock_config_entry.unique_id,
|
||||
}
|
||||
)
|
||||
raw_notification_full = {
|
||||
"device_id": device.id,
|
||||
"serial_number": int(mock_config_entry.unique_id),
|
||||
**raw_notification,
|
||||
}
|
||||
|
||||
caplog.set_level(logging.DEBUG)
|
||||
|
||||
|
|
Loading…
Reference in New Issue