Fix account swaping
Deploy HEOS panel / deploy (push) Successful in 26s

This commit is contained in:
2026-09-18 02:05:48 +02:00
parent 053be20b9c
commit 5ca504c680
10 changed files with 885 additions and 21 deletions
+12
View File
@@ -42,6 +42,11 @@ class _FakeAvr:
class DemoController:
# app.py checks this before anything that would touch real hardware
# over the network -- the speakers this stands in for may be switched
# on in the next room.
demo = True
def __init__(self, cfg):
self.cfg = cfg
self.avr = _FakeAvr()
@@ -150,8 +155,15 @@ class DemoController:
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):
# A room put on one of its own inputs is off Spotify, which is how
# the panel lets go of a room -- see app.py's _spotify_release.
if key in self._spotify:
self._spotify[key] = False
return None
def on_spotify(self, key):
return self._spotify.get(key, False)
# -- the AVR: app.py calls these directly, same as the real Controller
def avr_inputs(self):
return self.avr.inputs()