Skip to content

Commit

Permalink
Merge pull request #39 from vigonotion/sound-program-labels
Browse files Browse the repository at this point in the history
Add sound_program_names to MusicCastData
  • Loading branch information
micha91 authored Jul 3, 2022
2 parents 5dd1163 + 01a6859 commit 3fbff4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions aiomusiccast/musiccast_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __init__(self):
# features
self.zones: Dict[str, MusicCastZoneData] = {}
self.input_names: Dict[str, str] = {}
self.sound_program_names: Dict[str, str] = {}

# NetUSB data
self.netusb_input = None
Expand Down
5 changes: 5 additions & 0 deletions aiomusiccast/musiccast_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,11 @@ async def fetch(self):
for source in self._name_text.get("input_list")
}

self.data.sound_program_names = {
program.get("id"): program.get("text")
for program in self._name_text.get("sound_program_list")
}

if "netusb" in self._features.keys() and self._features.get("netusb").get("func_list"):
await self._fetch_netusb()
await self._fetch_netusb_presets()
Expand Down

0 comments on commit 3fbff4b

Please sign in to comment.