Bump mozart-api to 4.1.1.116.3 (#131269)

This commit is contained in:
Markus Jacobsen
2024-11-22 20:07:11 +01:00
committed by GitHub
parent e690c1026c
commit ecb945e08c
4 changed files with 13 additions and 10 deletions

View File

@@ -15,7 +15,7 @@ from mozart_api.models import (
VolumeState,
WebsocketNotificationTag,
)
from mozart_api.mozart_client import MozartClient
from mozart_api.mozart_client import BaseWebSocketResponse, MozartClient
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
@@ -202,12 +202,15 @@ class BangOlufsenWebsocket(BangOlufsenBase):
sw_version=software_status.software_version,
)
def on_all_notifications_raw(self, notification: dict) -> None:
def on_all_notifications_raw(self, notification: BaseWebSocketResponse) -> None:
"""Receive all notifications."""
# Add the device_id and serial_number to the notification
notification["device_id"] = self._device.id
notification["serial_number"] = int(self._unique_id)
_LOGGER.debug("%s", notification)
self.hass.bus.async_fire(BANG_OLUFSEN_WEBSOCKET_EVENT, notification)
self.hass.bus.async_fire(
BANG_OLUFSEN_WEBSOCKET_EVENT,
{
"device_id": self._device.id,
"serial_number": int(self._unique_id),
**notification,
},
)