From 35c5d9987ae1807f3a3af7abdd574e96e088de04 Mon Sep 17 00:00:00 2001 From: mj23000 Date: Fri, 22 Nov 2024 16:52:06 +0100 Subject: [PATCH] Fix base WebSocketEvent class being referenced instead of eventData class --- docs/mozart-api.yaml | 70 +++++------ python_client/PKG-INFO | 2 +- python_client/mozart_api/__init__.py | 2 +- python_client/mozart_api/api_client.py | 2 +- python_client/mozart_api/configuration.py | 2 +- python_client/mozart_api/mozart_client.py | 139 +++++++++++----------- python_client/pyproject.toml | 2 +- 7 files changed, 109 insertions(+), 110 deletions(-) diff --git a/docs/mozart-api.yaml b/docs/mozart-api.yaml index df58b36..e6ecc3e 100644 --- a/docs/mozart-api.yaml +++ b/docs/mozart-api.yaml @@ -2888,7 +2888,7 @@ components: async def receive_active_hdmi_input_signal_notifications(): """React on WebSocketEventActiveHdmiInputSignal events.""" - def active_hdmi_input_signal_notifications(notification: WebSocketEventActiveHdmiInputSignal): + def active_hdmi_input_signal_notifications(notification: HdmiInput): """ActiveHdmiInputSignal notification handler.""" print(notification) @@ -2964,7 +2964,7 @@ components: async def receive_active_listening_mode_notifications(): """React on WebSocketEventActiveListeningMode events.""" - def active_listening_mode_notifications(notification: WebSocketEventActiveListeningMode): + def active_listening_mode_notifications(notification: ListeningModeProps): """ActiveListeningMode notification handler.""" print(notification) @@ -3040,7 +3040,7 @@ components: async def receive_active_speaker_group_notifications(): """React on WebSocketEventActiveSpeakerGroup events.""" - def active_speaker_group_notifications(notification: WebSocketEventActiveSpeakerGroup): + def active_speaker_group_notifications(notification: SpeakerGroupOverview): """ActiveSpeakerGroup notification handler.""" print(notification) @@ -3116,7 +3116,7 @@ components: async def receive_alarm_timer_notifications(): """React on WebSocketEventAlarmTimer events.""" - def alarm_timer_notifications(notification: WebSocketEventAlarmTimer): + def alarm_timer_notifications(notification: AlarmTimerEventData): """AlarmTimer notification handler.""" print(notification) @@ -3192,7 +3192,7 @@ components: async def receive_alarm_triggered_notifications(): """React on WebSocketEventAlarmTriggered events.""" - def alarm_triggered_notifications(notification: WebSocketEventAlarmTriggered): + def alarm_triggered_notifications(notification: AlarmTriggeredInfo): """AlarmTriggered notification handler.""" print(notification) @@ -3268,7 +3268,7 @@ components: async def receive_battery_notifications(): """React on WebSocketEventBattery events.""" - def battery_notifications(notification: WebSocketEventBattery): + def battery_notifications(notification: BatteryState): """Battery notification handler.""" print(notification) @@ -3344,7 +3344,7 @@ components: async def receive_beo_remote_button_notifications(): """React on WebSocketEventBeoRemoteButton events.""" - def beo_remote_button_notifications(notification: WebSocketEventBeoRemoteButton): + def beo_remote_button_notifications(notification: BeoRemoteButton): """BeoRemoteButton notification handler.""" print(notification) @@ -3420,7 +3420,7 @@ components: async def receive_beolink_experiences_result_notifications(): """React on WebSocketEventBeolinkExperiencesResult events.""" - def beolink_experiences_result_notifications(notification: WebSocketEventBeolinkExperiencesResult): + def beolink_experiences_result_notifications(notification: BeolinkExperiencesResult): """BeolinkExperiencesResult notification handler.""" print(notification) @@ -3499,7 +3499,7 @@ components: async def receive_beolink_join_result_notifications(): """React on WebSocketEventBeolinkJoinResult events.""" - def beolink_join_result_notifications(notification: WebSocketEventBeolinkJoinResult): + def beolink_join_result_notifications(notification: BeolinkJoinResult): """BeolinkJoinResult notification handler.""" print(notification) @@ -3578,7 +3578,7 @@ components: async def receive_button_notifications(): """React on WebSocketEventButton events.""" - def button_notifications(notification: WebSocketEventButton): + def button_notifications(notification: ButtonEvent): """Button notification handler.""" print(notification) @@ -3654,7 +3654,7 @@ components: async def receive_curtains_notifications(): """React on WebSocketEventCurtains events.""" - def curtains_notifications(notification: WebSocketEventCurtains): + def curtains_notifications(notification: ProductCurtainStatus): """Curtains notification handler.""" print(notification) @@ -3730,7 +3730,7 @@ components: async def receive_hdmi_video_format_signal_notifications(): """React on WebSocketEventHdmiVideoFormatSignal events.""" - def hdmi_video_format_signal_notifications(notification: WebSocketEventHdmiVideoFormatSignal): + def hdmi_video_format_signal_notifications(notification: HdmiVideoFormat): """HdmiVideoFormatSignal notification handler.""" print(notification) @@ -3807,7 +3807,7 @@ components: async def receive_notification_notifications(): """React on WebSocketEventNotification events.""" - def notification_notifications(notification: WebSocketEventNotification): + def notification_notifications(notification: WebsocketNotificationTag): """Notification notification handler.""" print(notification) @@ -3883,7 +3883,7 @@ components: async def receive_playback_error_notifications(): """React on WebSocketEventPlaybackError events.""" - def playback_error_notifications(notification: WebSocketEventPlaybackError): + def playback_error_notifications(notification: PlaybackError): """PlaybackError notification handler.""" print(notification) @@ -3959,7 +3959,7 @@ components: async def receive_playback_metadata_notifications(): """React on WebSocketEventPlaybackMetadata events.""" - def playback_metadata_notifications(notification: WebSocketEventPlaybackMetadata): + def playback_metadata_notifications(notification: PlaybackContentMetadata): """PlaybackMetadata notification handler.""" print(notification) @@ -4035,7 +4035,7 @@ components: async def receive_playback_progress_notifications(): """React on WebSocketEventPlaybackProgress events.""" - def playback_progress_notifications(notification: WebSocketEventPlaybackProgress): + def playback_progress_notifications(notification: PlaybackProgress): """PlaybackProgress notification handler.""" print(notification) @@ -4111,7 +4111,7 @@ components: async def receive_playback_source_notifications(): """React on WebSocketEventPlaybackSource events.""" - def playback_source_notifications(notification: WebSocketEventPlaybackSource): + def playback_source_notifications(notification: Source): """PlaybackSource notification handler.""" print(notification) @@ -4187,7 +4187,7 @@ components: async def receive_playback_state_notifications(): """React on WebSocketEventPlaybackState events.""" - def playback_state_notifications(notification: WebSocketEventPlaybackState): + def playback_state_notifications(notification: RenderingState): """PlaybackState notification handler.""" print(notification) @@ -4263,7 +4263,7 @@ components: async def receive_power_state_notifications(): """React on WebSocketEventPowerState events.""" - def power_state_notifications(notification: WebSocketEventPowerState): + def power_state_notifications(notification: PowerStateEnum): """PowerState notification handler.""" print(notification) @@ -4339,7 +4339,7 @@ components: async def receive_powerlink_connection_state_notifications(): """React on WebSocketEventPowerlinkConnectionState events.""" - def powerlink_connection_state_notifications(notification: WebSocketEventPowerlinkConnectionState): + def powerlink_connection_state_notifications(notification: PowerlinkConnectionStateEnum): """PowerlinkConnectionState notification handler.""" print(notification) @@ -4415,7 +4415,7 @@ components: async def receive_puc_install_remote_id_status_notifications(): """React on WebSocketEventPucInstallRemoteIdStatus events.""" - def puc_install_remote_id_status_notifications(notification: WebSocketEventPucInstallRemoteIdStatus): + def puc_install_remote_id_status_notifications(notification: InstallRecordIdState): """PucInstallRemoteIdStatus notification handler.""" print(notification) @@ -4491,7 +4491,7 @@ components: async def receive_role_notifications(): """React on WebSocketEventRole events.""" - def role_notifications(notification: WebSocketEventRole): + def role_notifications(notification: SpeakerRoleEnum): """Role notification handler.""" print(notification) @@ -4570,7 +4570,7 @@ components: async def receive_room_compensation_current_measurement_event_notifications(): """React on WebSocketEventRoomCompensationCurrentMeasurementEvent events.""" - def room_compensation_current_measurement_event_notifications(notification: WebSocketEventRoomCompensationCurrentMeasurementEvent): + def room_compensation_current_measurement_event_notifications(notification: RoomCompensationCurrentMeasurement): """RoomCompensationCurrentMeasurementEvent notification handler.""" print(notification) @@ -4646,7 +4646,7 @@ components: async def receive_room_compensation_state_notifications(): """React on WebSocketEventRoomCompensationState events.""" - def room_compensation_state_notifications(notification: WebSocketEventRoomCompensationState): + def room_compensation_state_notifications(notification: RoomCompensationStateValue): """RoomCompensationState notification handler.""" print(notification) @@ -4722,7 +4722,7 @@ components: async def receive_software_update_state_notifications(): """React on WebSocketEventSoftwareUpdateState events.""" - def software_update_state_notifications(notification: WebSocketEventSoftwareUpdateState): + def software_update_state_notifications(notification: SoftwareUpdateState): """SoftwareUpdateState notification handler.""" print(notification) @@ -4798,7 +4798,7 @@ components: async def receive_sound_settings_notifications(): """React on WebSocketEventSoundSettings events.""" - def sound_settings_notifications(notification: WebSocketEventSoundSettings): + def sound_settings_notifications(notification: SoundSettings): """SoundSettings notification handler.""" print(notification) @@ -4874,7 +4874,7 @@ components: async def receive_source_change_notifications(): """React on WebSocketEventSourceChange events.""" - def source_change_notifications(notification: WebSocketEventSourceChange): + def source_change_notifications(notification: Source): """SourceChange notification handler.""" print(notification) @@ -4950,7 +4950,7 @@ components: async def receive_speaker_group_changed_notifications(): """React on WebSocketEventSpeakerGroupChanged events.""" - def speaker_group_changed_notifications(notification: WebSocketEventSpeakerGroupChanged): + def speaker_group_changed_notifications(notification: str): """SpeakerGroupChanged notification handler.""" print(notification) @@ -5026,7 +5026,7 @@ components: async def receive_speaker_link_status_changed_notifications(): """React on WebSocketEventSpeakerLinkStatusChanged events.""" - def speaker_link_status_changed_notifications(notification: WebSocketEventSpeakerLinkStatusChanged): + def speaker_link_status_changed_notifications(notification: SpeakerLinkStatus): """SpeakerLinkStatusChanged notification handler.""" print(notification) @@ -5102,7 +5102,7 @@ components: async def receive_stand_connected_notifications(): """React on WebSocketEventStandConnected events.""" - def stand_connected_notifications(notification: WebSocketEventStandConnected): + def stand_connected_notifications(notification: StandConnected): """StandConnected notification handler.""" print(notification) @@ -5178,7 +5178,7 @@ components: async def receive_stand_position_notifications(): """React on WebSocketEventStandPosition events.""" - def stand_position_notifications(notification: WebSocketEventStandPosition): + def stand_position_notifications(notification: StandPosition): """StandPosition notification handler.""" print(notification) @@ -5254,7 +5254,7 @@ components: async def receive_tv_info_notifications(): """React on WebSocketEventTvInfo events.""" - def tv_info_notifications(notification: WebSocketEventTvInfo): + def tv_info_notifications(notification: TvInfoEventData): """TvInfo notification handler.""" print(notification) @@ -5330,7 +5330,7 @@ components: async def receive_volume_notifications(): """React on WebSocketEventVolume events.""" - def volume_notifications(notification: WebSocketEventVolume): + def volume_notifications(notification: VolumeState): """Volume notification handler.""" print(notification) @@ -5407,7 +5407,7 @@ components: async def receive_wisa_out_state_notifications(): """React on WebSocketEventWisaOutState events.""" - def wisa_out_state_notifications(notification: WebSocketEventWisaOutState): + def wisa_out_state_notifications(notification: WisaOutState): """WisaOutState notification handler.""" print(notification) @@ -5520,7 +5520,7 @@ info: - [Beosound Level](https://www.bang-olufsen.com/en/dk/speakers/beosound-level)\n\ - [Beosound Theatre](https://www.bang-olufsen.com/en/dk/soundbars/beosound-theatre)\n\ \n\nThis API documentation has been generated for version 4.1.1.116 of the\ - \ Mozart platform and API generation version 4.1.1.116.1.\n\n## Python API\n\ + \ Mozart platform and API generation version 4.1.1.116.2.\n\n## Python API\n\ \nThe Python package has been generated using the [OpenAPI Generator](https:/openapi-generator.tech/)\ \ version 7.10.0. On top of the generated API, a helper file, mozart_client.py,\ \ has been made that makes the API more pythonic. We recommend using this.\n\ diff --git a/python_client/PKG-INFO b/python_client/PKG-INFO index f2fee6c..c9da7e7 100644 --- a/python_client/PKG-INFO +++ b/python_client/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: mozart_api -Version: 4.1.1.116.1 +Version: 4.1.1.116.2 Summary: Mozart platform API Home-page: https://pypi.org/project/mozart-api/ License: MIT diff --git a/python_client/mozart_api/__init__.py b/python_client/mozart_api/__init__.py index 69a7d62..e6118c7 100644 --- a/python_client/mozart_api/__init__.py +++ b/python_client/mozart_api/__init__.py @@ -14,7 +14,7 @@ Do not edit the class manually. """ # noqa: E501 -__version__ = "4.1.1.116.1" +__version__ = "4.1.1.116.2" # import manually created api client from mozart_api.mozart_client import ( diff --git a/python_client/mozart_api/api_client.py b/python_client/mozart_api/api_client.py index f3be47d..1a29d44 100644 --- a/python_client/mozart_api/api_client.py +++ b/python_client/mozart_api/api_client.py @@ -87,7 +87,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/4.1.1.116.1/python" + self.user_agent = "OpenAPI-Generator/4.1.1.116.2/python" self.client_side_validation = configuration.client_side_validation async def __aenter__(self): diff --git a/python_client/mozart_api/configuration.py b/python_client/mozart_api/configuration.py index 599c487..f9db52f 100644 --- a/python_client/mozart_api/configuration.py +++ b/python_client/mozart_api/configuration.py @@ -380,7 +380,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 0.2.0\n" - "SDK Package Version: 4.1.1.116.1".format( + "SDK Package Version: 4.1.1.116.2".format( env=sys.platform, pyversion=sys.version ) ) diff --git a/python_client/mozart_api/mozart_client.py b/python_client/mozart_api/mozart_client.py index e3c72cf..bc0f3bb 100644 --- a/python_client/mozart_api/mozart_client.py +++ b/python_client/mozart_api/mozart_client.py @@ -26,10 +26,40 @@ from mozart_api.api_client import ApiClient from mozart_api.configuration import Configuration from mozart_api.exceptions import ApiException + +# Generated section start from mozart_api.models import ( + AlarmTimerEventData, + AlarmTriggeredInfo, Art, + BatteryState, + BeolinkExperiencesResult, + BeolinkJoinResult, + BeoRemoteButton, + ButtonEvent, + HdmiInput, + HdmiVideoFormat, + InstallRecordIdState, + ListeningModeProps, PlaybackContentMetadata, - # Generated section start + PlaybackError, + PlaybackProgress, + PowerlinkConnectionStateEnum, + PowerStateEnum, + ProductCurtainStatus, + RenderingState, + RoomCompensationCurrentMeasurement, + RoomCompensationStateValue, + SoftwareUpdateState, + SoundSettings, + Source, + SpeakerGroupOverview, + SpeakerLinkStatus, + SpeakerRoleEnum, + StandConnected, + StandPosition, + TvInfoEventData, + VolumeState, WebSocketEventActiveHdmiInputSignal, WebSocketEventActiveListeningMode, WebSocketEventActiveSpeakerGroup, @@ -64,8 +94,11 @@ WebSocketEventTvInfo, WebSocketEventVolume, WebSocketEventWisaOutState, - # Generated section end + WebsocketNotificationTag, + WisaOutState, ) + +# Generated section end from mozart_api.rest import RESTClientObject # Generated section start @@ -532,10 +565,7 @@ def get_all_notifications_raw( # Generated section start def get_active_hdmi_input_signal_notifications( - self, - on_active_hdmi_input_signal_notification: Callable[ - [WebSocketEventActiveHdmiInputSignal], None - ], + self, on_active_hdmi_input_signal_notification: Callable[[HdmiInput], None] ) -> None: """Set callback for WebSocketEventActiveHdmiInputSignal notifications.""" self._notification_callbacks["WebSocketEventActiveHdmiInputSignal"] = ( @@ -544,9 +574,7 @@ def get_active_hdmi_input_signal_notifications( def get_active_listening_mode_notifications( self, - on_active_listening_mode_notification: Callable[ - [WebSocketEventActiveListeningMode], None - ], + on_active_listening_mode_notification: Callable[[ListeningModeProps], None], ) -> None: """Set callback for WebSocketEventActiveListeningMode notifications.""" self._notification_callbacks["WebSocketEventActiveListeningMode"] = ( @@ -555,9 +583,7 @@ def get_active_listening_mode_notifications( def get_active_speaker_group_notifications( self, - on_active_speaker_group_notification: Callable[ - [WebSocketEventActiveSpeakerGroup], None - ], + on_active_speaker_group_notification: Callable[[SpeakerGroupOverview], None], ) -> None: """Set callback for WebSocketEventActiveSpeakerGroup notifications.""" self._notification_callbacks["WebSocketEventActiveSpeakerGroup"] = ( @@ -565,7 +591,7 @@ def get_active_speaker_group_notifications( ) def get_alarm_timer_notifications( - self, on_alarm_timer_notification: Callable[[WebSocketEventAlarmTimer], None] + self, on_alarm_timer_notification: Callable[[AlarmTimerEventData], None] ) -> None: """Set callback for WebSocketEventAlarmTimer notifications.""" self._notification_callbacks["WebSocketEventAlarmTimer"] = ( @@ -573,8 +599,7 @@ def get_alarm_timer_notifications( ) def get_alarm_triggered_notifications( - self, - on_alarm_triggered_notification: Callable[[WebSocketEventAlarmTriggered], None], + self, on_alarm_triggered_notification: Callable[[AlarmTriggeredInfo], None] ) -> None: """Set callback for WebSocketEventAlarmTriggered notifications.""" self._notification_callbacks["WebSocketEventAlarmTriggered"] = ( @@ -582,16 +607,13 @@ def get_alarm_triggered_notifications( ) def get_battery_notifications( - self, on_battery_notification: Callable[[WebSocketEventBattery], None] + self, on_battery_notification: Callable[[BatteryState], None] ) -> None: """Set callback for WebSocketEventBattery notifications.""" self._notification_callbacks["WebSocketEventBattery"] = on_battery_notification def get_beo_remote_button_notifications( - self, - on_beo_remote_button_notification: Callable[ - [WebSocketEventBeoRemoteButton], None - ], + self, on_beo_remote_button_notification: Callable[[BeoRemoteButton], None] ) -> None: """Set callback for WebSocketEventBeoRemoteButton notifications.""" self._notification_callbacks["WebSocketEventBeoRemoteButton"] = ( @@ -601,7 +623,7 @@ def get_beo_remote_button_notifications( def get_beolink_experiences_result_notifications( self, on_beolink_experiences_result_notification: Callable[ - [WebSocketEventBeolinkExperiencesResult], None + [BeolinkExperiencesResult], None ], ) -> None: """Set callback for WebSocketEventBeolinkExperiencesResult notifications.""" @@ -610,10 +632,7 @@ def get_beolink_experiences_result_notifications( ) def get_beolink_join_result_notifications( - self, - on_beolink_join_result_notification: Callable[ - [WebSocketEventBeolinkJoinResult], None - ], + self, on_beolink_join_result_notification: Callable[[BeolinkJoinResult], None] ) -> None: """Set callback for WebSocketEventBeolinkJoinResult notifications.""" self._notification_callbacks["WebSocketEventBeolinkJoinResult"] = ( @@ -621,13 +640,13 @@ def get_beolink_join_result_notifications( ) def get_button_notifications( - self, on_button_notification: Callable[[WebSocketEventButton], None] + self, on_button_notification: Callable[[ButtonEvent], None] ) -> None: """Set callback for WebSocketEventButton notifications.""" self._notification_callbacks["WebSocketEventButton"] = on_button_notification def get_curtains_notifications( - self, on_curtains_notification: Callable[[WebSocketEventCurtains], None] + self, on_curtains_notification: Callable[[ProductCurtainStatus], None] ) -> None: """Set callback for WebSocketEventCurtains notifications.""" self._notification_callbacks["WebSocketEventCurtains"] = ( @@ -636,9 +655,7 @@ def get_curtains_notifications( def get_hdmi_video_format_signal_notifications( self, - on_hdmi_video_format_signal_notification: Callable[ - [WebSocketEventHdmiVideoFormatSignal], None - ], + on_hdmi_video_format_signal_notification: Callable[[HdmiVideoFormat], None], ) -> None: """Set callback for WebSocketEventHdmiVideoFormatSignal notifications.""" self._notification_callbacks["WebSocketEventHdmiVideoFormatSignal"] = ( @@ -646,7 +663,7 @@ def get_hdmi_video_format_signal_notifications( ) def get_notification_notifications( - self, on_notification_notification: Callable[[WebSocketEventNotification], None] + self, on_notification_notification: Callable[[WebsocketNotificationTag], None] ) -> None: """Set callback for WebSocketEventNotification notifications.""" self._notification_callbacks["WebSocketEventNotification"] = ( @@ -654,8 +671,7 @@ def get_notification_notifications( ) def get_playback_error_notifications( - self, - on_playback_error_notification: Callable[[WebSocketEventPlaybackError], None], + self, on_playback_error_notification: Callable[[PlaybackError], None] ) -> None: """Set callback for WebSocketEventPlaybackError notifications.""" self._notification_callbacks["WebSocketEventPlaybackError"] = ( @@ -664,9 +680,7 @@ def get_playback_error_notifications( def get_playback_metadata_notifications( self, - on_playback_metadata_notification: Callable[ - [WebSocketEventPlaybackMetadata], None - ], + on_playback_metadata_notification: Callable[[PlaybackContentMetadata], None], ) -> None: """Set callback for WebSocketEventPlaybackMetadata notifications.""" self._notification_callbacks["WebSocketEventPlaybackMetadata"] = ( @@ -674,10 +688,7 @@ def get_playback_metadata_notifications( ) def get_playback_progress_notifications( - self, - on_playback_progress_notification: Callable[ - [WebSocketEventPlaybackProgress], None - ], + self, on_playback_progress_notification: Callable[[PlaybackProgress], None] ) -> None: """Set callback for WebSocketEventPlaybackProgress notifications.""" self._notification_callbacks["WebSocketEventPlaybackProgress"] = ( @@ -685,8 +696,7 @@ def get_playback_progress_notifications( ) def get_playback_source_notifications( - self, - on_playback_source_notification: Callable[[WebSocketEventPlaybackSource], None], + self, on_playback_source_notification: Callable[[Source], None] ) -> None: """Set callback for WebSocketEventPlaybackSource notifications.""" self._notification_callbacks["WebSocketEventPlaybackSource"] = ( @@ -694,8 +704,7 @@ def get_playback_source_notifications( ) def get_playback_state_notifications( - self, - on_playback_state_notification: Callable[[WebSocketEventPlaybackState], None], + self, on_playback_state_notification: Callable[[RenderingState], None] ) -> None: """Set callback for WebSocketEventPlaybackState notifications.""" self._notification_callbacks["WebSocketEventPlaybackState"] = ( @@ -703,7 +712,7 @@ def get_playback_state_notifications( ) def get_power_state_notifications( - self, on_power_state_notification: Callable[[WebSocketEventPowerState], None] + self, on_power_state_notification: Callable[[PowerStateEnum], None] ) -> None: """Set callback for WebSocketEventPowerState notifications.""" self._notification_callbacks["WebSocketEventPowerState"] = ( @@ -713,7 +722,7 @@ def get_power_state_notifications( def get_powerlink_connection_state_notifications( self, on_powerlink_connection_state_notification: Callable[ - [WebSocketEventPowerlinkConnectionState], None + [PowerlinkConnectionStateEnum], None ], ) -> None: """Set callback for WebSocketEventPowerlinkConnectionState notifications.""" @@ -724,7 +733,7 @@ def get_powerlink_connection_state_notifications( def get_puc_install_remote_id_status_notifications( self, on_puc_install_remote_id_status_notification: Callable[ - [WebSocketEventPucInstallRemoteIdStatus], None + [InstallRecordIdState], None ], ) -> None: """Set callback for WebSocketEventPucInstallRemoteIdStatus notifications.""" @@ -733,7 +742,7 @@ def get_puc_install_remote_id_status_notifications( ) def get_role_notifications( - self, on_role_notification: Callable[[WebSocketEventRole], None] + self, on_role_notification: Callable[[SpeakerRoleEnum], None] ) -> None: """Set callback for WebSocketEventRole notifications.""" self._notification_callbacks["WebSocketEventRole"] = on_role_notification @@ -741,7 +750,7 @@ def get_role_notifications( def get_room_compensation_current_measurement_event_notifications( self, on_room_compensation_current_measurement_event_notification: Callable[ - [WebSocketEventRoomCompensationCurrentMeasurementEvent], None + [RoomCompensationCurrentMeasurement], None ], ) -> None: """Set callback for WebSocketEventRoomCompensationCurrentMeasurementEvent notifications.""" @@ -752,7 +761,7 @@ def get_room_compensation_current_measurement_event_notifications( def get_room_compensation_state_notifications( self, on_room_compensation_state_notification: Callable[ - [WebSocketEventRoomCompensationState], None + [RoomCompensationStateValue], None ], ) -> None: """Set callback for WebSocketEventRoomCompensationState notifications.""" @@ -762,9 +771,7 @@ def get_room_compensation_state_notifications( def get_software_update_state_notifications( self, - on_software_update_state_notification: Callable[ - [WebSocketEventSoftwareUpdateState], None - ], + on_software_update_state_notification: Callable[[SoftwareUpdateState], None], ) -> None: """Set callback for WebSocketEventSoftwareUpdateState notifications.""" self._notification_callbacks["WebSocketEventSoftwareUpdateState"] = ( @@ -772,8 +779,7 @@ def get_software_update_state_notifications( ) def get_sound_settings_notifications( - self, - on_sound_settings_notification: Callable[[WebSocketEventSoundSettings], None], + self, on_sound_settings_notification: Callable[[SoundSettings], None] ) -> None: """Set callback for WebSocketEventSoundSettings notifications.""" self._notification_callbacks["WebSocketEventSoundSettings"] = ( @@ -781,8 +787,7 @@ def get_sound_settings_notifications( ) def get_source_change_notifications( - self, - on_source_change_notification: Callable[[WebSocketEventSourceChange], None], + self, on_source_change_notification: Callable[[Source], None] ) -> None: """Set callback for WebSocketEventSourceChange notifications.""" self._notification_callbacks["WebSocketEventSourceChange"] = ( @@ -790,10 +795,7 @@ def get_source_change_notifications( ) def get_speaker_group_changed_notifications( - self, - on_speaker_group_changed_notification: Callable[ - [WebSocketEventSpeakerGroupChanged], None - ], + self, on_speaker_group_changed_notification: Callable[[str], None] ) -> None: """Set callback for WebSocketEventSpeakerGroupChanged notifications.""" self._notification_callbacks["WebSocketEventSpeakerGroupChanged"] = ( @@ -803,7 +805,7 @@ def get_speaker_group_changed_notifications( def get_speaker_link_status_changed_notifications( self, on_speaker_link_status_changed_notification: Callable[ - [WebSocketEventSpeakerLinkStatusChanged], None + [SpeakerLinkStatus], None ], ) -> None: """Set callback for WebSocketEventSpeakerLinkStatusChanged notifications.""" @@ -812,8 +814,7 @@ def get_speaker_link_status_changed_notifications( ) def get_stand_connected_notifications( - self, - on_stand_connected_notification: Callable[[WebSocketEventStandConnected], None], + self, on_stand_connected_notification: Callable[[StandConnected], None] ) -> None: """Set callback for WebSocketEventStandConnected notifications.""" self._notification_callbacks["WebSocketEventStandConnected"] = ( @@ -821,8 +822,7 @@ def get_stand_connected_notifications( ) def get_stand_position_notifications( - self, - on_stand_position_notification: Callable[[WebSocketEventStandPosition], None], + self, on_stand_position_notification: Callable[[StandPosition], None] ) -> None: """Set callback for WebSocketEventStandPosition notifications.""" self._notification_callbacks["WebSocketEventStandPosition"] = ( @@ -830,20 +830,19 @@ def get_stand_position_notifications( ) def get_tv_info_notifications( - self, on_tv_info_notification: Callable[[WebSocketEventTvInfo], None] + self, on_tv_info_notification: Callable[[TvInfoEventData], None] ) -> None: """Set callback for WebSocketEventTvInfo notifications.""" self._notification_callbacks["WebSocketEventTvInfo"] = on_tv_info_notification def get_volume_notifications( - self, on_volume_notification: Callable[[WebSocketEventVolume], None] + self, on_volume_notification: Callable[[VolumeState], None] ) -> None: """Set callback for WebSocketEventVolume notifications.""" self._notification_callbacks["WebSocketEventVolume"] = on_volume_notification def get_wisa_out_state_notifications( - self, - on_wisa_out_state_notification: Callable[[WebSocketEventWisaOutState], None], + self, on_wisa_out_state_notification: Callable[[WisaOutState], None] ) -> None: """Set callback for WebSocketEventWisaOutState notifications.""" self._notification_callbacks["WebSocketEventWisaOutState"] = ( diff --git a/python_client/pyproject.toml b/python_client/pyproject.toml index 10e51f1..dcee2eb 100644 --- a/python_client/pyproject.toml +++ b/python_client/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "mozart_api" -version = "4.1.1.116.1" +version = "4.1.1.116.2" description = "Mozart platform API" authors = [ "BangOlufsen ",