Skip to content

Commit

Permalink
Use @only_on_soundbars for surround_enabled setter
Browse files Browse the repository at this point in the history
  • Loading branch information
rytilahti committed Dec 14, 2021
1 parent ed84f74 commit eb703f9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions soco/core.py
Expand Up @@ -211,7 +211,6 @@ class SoCo(_SocoSingletonBase):
is_bridge
is_coordinator
is_soundbar
surround_enabled
is_satellite
has_satellites
sub_enabled
Expand All @@ -224,6 +223,7 @@ class SoCo(_SocoSingletonBase):
balance
night_mode
dialog_mode
surround_enabled
surround_music_playback
surround_volume_tv
surround_volume_music
Expand Down Expand Up @@ -1034,16 +1034,13 @@ def surround_enabled(self):
return bool(int(response["CurrentValue"]))

@surround_enabled.setter
@only_on_soundbars
def surround_enabled(self, enable):
"""Enable/disable the connected surround speakers.
:param enable: Enable or disable surround speakers
:type enable: bool
"""
if not self.is_soundbar:
message = "This device does not support surrounds"
raise NotSupportedException(message)

self.renderingControl.SetEQ(
[
("InstanceID", 0),
Expand Down

0 comments on commit eb703f9

Please sign in to comment.