Skip to content

Commit

Permalink
Add sound_program_names to MusicCastData
Browse files Browse the repository at this point in the history
  • Loading branch information
micha91 committed Jun 19, 2022
1 parent 5dd1163 commit 01a6859
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 01a6859

Please sign in to comment.