@@ -71,9 +71,26 @@ class BangOlufsenModel(StrEnum):
7171 BEOSOUND_BALANCE = "Beosound Balance"
7272 BEOSOUND_EMERGE = "Beosound Emerge"
7373 BEOSOUND_LEVEL = "Beosound Level"
74+ BEOSOUND_PREMIERE = "Beosound Premiere"
7475 BEOSOUND_THEATRE = "Beosound Theatre"
7576
7677
78+ # Physical "buttons" on devices
79+ class BangOlufsenButtons (StrEnum ):
80+ """Enum for device buttons."""
81+
82+ BLUETOOTH = "Bluetooth"
83+ MICROPHONE = "Microphone"
84+ NEXT = "Next"
85+ PLAY_PAUSE = "PlayPause"
86+ PRESET_1 = "Preset1"
87+ PRESET_2 = "Preset2"
88+ PRESET_3 = "Preset3"
89+ PRESET_4 = "Preset4"
90+ PREVIOUS = "Previous"
91+ VOLUME = "Volume"
92+
93+
7794# Dispatcher events
7895class WebsocketNotification (StrEnum ):
7996 """Enum for WebSocket notification types."""
@@ -204,23 +221,6 @@ class WebsocketNotification(StrEnum):
204221 ),
205222 ]
206223)
207- # Map for storing compatibility of devices.
208-
209- MODEL_SUPPORT_DEVICE_BUTTONS : Final [str ] = "device_buttons"
210-
211- MODEL_SUPPORT_MAP = {
212- MODEL_SUPPORT_DEVICE_BUTTONS : (
213- BangOlufsenModel .BEOLAB_8 ,
214- BangOlufsenModel .BEOLAB_28 ,
215- BangOlufsenModel .BEOSOUND_2 ,
216- BangOlufsenModel .BEOSOUND_A5 ,
217- BangOlufsenModel .BEOSOUND_A9 ,
218- BangOlufsenModel .BEOSOUND_BALANCE ,
219- BangOlufsenModel .BEOSOUND_EMERGE ,
220- BangOlufsenModel .BEOSOUND_LEVEL ,
221- BangOlufsenModel .BEOSOUND_THEATRE ,
222- )
223- }
224224
225225# Device events
226226BANG_OLUFSEN_WEBSOCKET_EVENT : Final [str ] = f"{ DOMAIN } _websocket_event"
@@ -236,18 +236,7 @@ class WebsocketNotification(StrEnum):
236236
237237CONNECTION_STATUS : Final [str ] = "CONNECTION_STATUS"
238238
239- DEVICE_BUTTONS : Final [list [str ]] = [
240- "Bluetooth" ,
241- "Microphone" ,
242- "Next" ,
243- "PlayPause" ,
244- "Preset1" ,
245- "Preset2" ,
246- "Preset3" ,
247- "Preset4" ,
248- "Previous" ,
249- "Volume" ,
250- ]
239+ DEVICE_BUTTONS : Final [list [str ]] = [x .value for x in BangOlufsenButtons ]
251240
252241
253242DEVICE_BUTTON_EVENTS : Final [list [str ]] = [
0 commit comments