mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 15:16:33 +00:00
test 4
This commit is contained in:
parent
ef7a375396
commit
5becd51b50
@ -40,15 +40,15 @@ class AlsaAudio(CoreSysAttributes):
|
|||||||
|
|
||||||
def _update_device(self):
|
def _update_device(self):
|
||||||
"""Update Internal device DB."""
|
"""Update Internal device DB."""
|
||||||
#current_id = hash(frozenset(self._hardware.audio_devices))
|
current_id = hash(frozenset(self._hardware.audio_devices))
|
||||||
|
|
||||||
# Need rebuild?
|
# Need rebuild?
|
||||||
#if current_id == self._cache:
|
if current_id == self._cache:
|
||||||
# return
|
return
|
||||||
|
|
||||||
# Init database
|
# Init database
|
||||||
_LOGGER.info("Update ALSA device list")
|
_LOGGER.info("Update ALSA device list")
|
||||||
database = self._audio_database()
|
#database = self._audio_database()
|
||||||
|
|
||||||
# Process devices
|
# Process devices
|
||||||
for dev_id, dev_data in self._hardware.audio_devices.items():
|
for dev_id, dev_data in self._hardware.audio_devices.items():
|
||||||
@ -62,8 +62,8 @@ class AlsaAudio(CoreSysAttributes):
|
|||||||
_LOGGER.warning("Unknown channel type: %s", chan_type)
|
_LOGGER.warning("Unknown channel type: %s", chan_type)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
self._data[key][alsa_id] = database.get(self._machine, {}).get(
|
#self._data[key][alsa_id] = database.get(self._machine, {}).get(
|
||||||
alsa_id, f"{dev_data[ATTR_NAME]}: {chan_id}")
|
# alsa_id, f"{dev_data[ATTR_NAME]}: {chan_id}")
|
||||||
|
|
||||||
self._cache = current_id
|
self._cache = current_id
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user