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

This commit is contained in:
2026-09-15 22:07:43 +02:00
parent 6a0f1fa5e8
commit 7c19ff9096
17 changed files with 810 additions and 44 deletions
+12
View File
@@ -174,6 +174,18 @@ class PanelTest(unittest.TestCase):
self.panel.toggle_play("living_room_group", "pause")
self.assertEqual(self.heos.play_states[3], "pause")
def test_state_says_which_rooms_are_playing_spotify(self):
"""The cards only offer play/pause for a Spotify stream, so the
snapshot has to say which rooms have one."""
self.heos.now_playing_mid[HOME400_PID] = "spotify:track:4uLU6hMCjMI75M1A2tKUQC"
self.heos.now_playing_sid[HOME400_PID] = 4
state = self.panel.state()
self.assertEqual([r["spotify"] for r in state["rooms"]], [True, False])
def test_an_avr_input_is_not_spotify(self):
self.heos.now_playing_sid[AVR_PID] = 1027
self.assertFalse(self.panel.on_spotify("avr"))
# -- the AVR, entirely over HEOS --------------------------------------
def test_avr_inputs_carry_your_renamed_labels(self):
"""HEOS reports the AVR's own renamed sources itself (browse/browse