Add volume management to AVR
Deploy HEOS panel / deploy (push) Successful in 26s

This commit is contained in:
franzz committed 2026-09-20 18:18:28 +02:00
1 parent db00e57ef7
commit 9a3d0b8a72
6 files changed
+42 -19

No files matched your search

+14
View File
@@ -240,6 +240,20 @@ class PanelTest(unittest.TestCase):
self.assertTrue(all(isinstance(r["volume"], int) for r in state["rooms"]))
self.assertEqual([r["play_state"] for r in state["rooms"]], ["play", "play"])
def test_state_carries_the_avrs_own_volume(self):
"""The AVR's card has a level like every other, and it is the
player's own -- not the group's, even while it leads one."""
self.heos.volumes[AVR_PID] = 37
self.panel.join("lego_room")
self.assertEqual(self.panel.state()["avr"]["volume"], 37)
def test_the_avrs_volume_moves_like_a_rooms(self):
self.heos.volumes[AVR_PID] = 23
self.assertEqual(self.panel.step_volume("avr", 1), 25)
self.assertEqual(self.heos.volumes[AVR_PID], 25)
self.assertEqual(self.panel.set_volume("avr", 40), 40)
self.assertEqual(self.panel.volume("avr"), 40)
def test_state_reports_trouble_instead_of_blowing_up(self):
self.panel.heos.host = "127.0.0.1"
self.panel.heos.port = 1 # nothing is listening there