Skip to content

Commit fbc96ae

Browse files
committed
make setting and unsetting flag better
1 parent 96e26e6 commit fbc96ae

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

homeassistant/components/vizio/media_player.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,17 @@ async def async_update(self) -> None:
209209

210210
if "eq" in audio_settings:
211211
self._supported_commands = (
212-
SUPPORTED_COMMANDS[self._device_class] | SUPPORT_SELECT_SOUND_MODE
212+
self._supported_commands | SUPPORT_SELECT_SOUND_MODE
213213
)
214214
self._current_sound_mode = audio_settings["eq"]
215215
if self._available_sound_modes is None:
216216
self._available_sound_modes = await self._device.get_setting_options(
217217
"audio", "eq"
218218
)
219219
else:
220-
self._supported_commands = SUPPORTED_COMMANDS[self._device_class]
220+
self._supported_commands = (
221+
self._supported_commands ^ SUPPORT_SELECT_SOUND_MODE
222+
)
221223

222224
input_ = await self._device.get_current_input(log_api_exception=False)
223225
if input_ is not None:

0 commit comments

Comments
 (0)