mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 05:37:44 +00:00
Add check and remove temporary fix for lg soundbar eq and source list (#38798)
This commit is contained in:
parent
c225f4b4ea
commit
491e66793e
@ -121,11 +121,6 @@ class LGDevice(MediaPlayerEntity):
|
|||||||
self._device.get_settings()
|
self._device.get_settings()
|
||||||
self._device.get_product_info()
|
self._device.get_product_info()
|
||||||
|
|
||||||
# Temporary fix until handling of unknown equaliser settings is integrated in the temescal library
|
|
||||||
for equaliser in self._equalisers:
|
|
||||||
if equaliser >= len(temescal.equalisers):
|
|
||||||
temescal.equalisers.append("unknown " + str(equaliser))
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unique_id(self):
|
def unique_id(self):
|
||||||
"""Return the device's unique ID."""
|
"""Return the device's unique ID."""
|
||||||
@ -171,7 +166,7 @@ class LGDevice(MediaPlayerEntity):
|
|||||||
@property
|
@property
|
||||||
def source(self):
|
def source(self):
|
||||||
"""Return the current input source."""
|
"""Return the current input source."""
|
||||||
if self._function == -1:
|
if self._function == -1 or self._function >= len(temescal.functions):
|
||||||
return None
|
return None
|
||||||
return temescal.functions[self._function]
|
return temescal.functions[self._function]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user