Add icons
Deploy HEOS panel / deploy (push) Successful in 25s

This commit is contained in:
2026-09-16 18:06:14 +02:00
parent 3d4922fd19
commit 69476134f7
7 changed files with 115 additions and 24 deletions
+12 -9
View File
@@ -10,18 +10,21 @@ from controller import stepped_level
class _FakeAvr:
# Codes already in HEOS's own "inputs/<mid>" shape (see GET
# /api/avr/inputs against the real AVR), not the demo's own invention --
# the panel's input icon is keyed on this exact format.
INPUTS = [
{"code": "MPLAY", "name": "Apple TV"},
{"code": "GAME", "name": "PlayStation"},
{"code": "SAT/CBL", "name": "TV Box"},
{"code": "BD", "name": "Blu-ray"},
{"code": "TUNER", "name": "Radio"},
{"code": "PHONO", "name": "Turntable"},
{"code": "inputs/mediaplayer", "name": "Apple TV"},
{"code": "inputs/game", "name": "PlayStation"},
{"code": "inputs/tvaudio", "name": "TV Box"},
{"code": "inputs/bluray", "name": "Blu-ray"},
{"code": "inputs/tuner", "name": "Radio"},
{"code": "inputs/phono", "name": "Turntable"},
]
def __init__(self):
self.connected = True
self._code = "MPLAY"
self._code = "inputs/mediaplayer"
def inputs(self, refresh=False):
return list(self.INPUTS)
@@ -71,7 +74,7 @@ class DemoController:
# Standing in for a Zidoo plugged into this input, so the
# AVR card's now-playing block has something to show here too.
"now_playing": {"song": "Big Buck Bunny", "artist": None, "image": None}
if self.avr.current_input()["code"] == "MPLAY" else None,
if self.avr.current_input()["code"] == self.cfg.ZIDOO_INPUT_CODE else None,
},
"heos_ok": True,
"errors": [],
@@ -139,7 +142,7 @@ class DemoController:
return None
def heos_inputs(self, key):
return [{"name": s["name"], "input_id": f"inputs/{s['code'].lower()}"} for s in self.avr.inputs()]
return [{"name": s["name"], "input_id": s["code"]} for s in self.avr.inputs()]
def play_heos_input(self, key, input_id, source_key=None):
return None