Skip to content

Commit 50b7dfe

Browse files
committed
Fix zone_follower parsing from wrong property
1 parent 2bfceed commit 50b7dfe

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/pyblu/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def parse_sync_status(response: bytes) -> SyncStatus:
5555
followers=followers,
5656
zone=sync_status_element.attrib.get("zone"),
5757
zone_leader=sync_status_element.attrib.get("zoneMaster") == "true",
58-
zone_follower=sync_status_element.attrib.get("zoneMaster") == "true",
58+
zone_follower=sync_status_element.attrib.get("zoneSlave") == "true",
5959
brand=sync_status_element.attrib["brand"],
6060
model=sync_status_element.attrib["model"],
6161
model_name=sync_status_element.attrib["modelName"],

tests/test_player.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ async def test_sync_status():
233233
db="-17.1" modelName="NODE" model="N130"
234234
brand="Bluesound" initialized="true" id="1.1.1.1:11000" mac="00:11:22:33:44:55" volume="29"
235235
name="Node" etag="707" schemaVersion="34" syncStat="707" class="streamer"
236-
group="Node +2" zone="Desk" zoneMaster="true" zoneSlave="true">
236+
group="Node +2" zone="Desk" zoneMaster="true" zoneSlave="false">
237237
<pairWithSub/>
238238
<bluetoothOutput/>
239239
<master port="11000">192.168.1.100</master>
@@ -259,7 +259,7 @@ async def test_sync_status():
259259
assert sync_status.followers == [PairedPlayer(ip="192.168.1.153", port=11000), PairedPlayer(ip="192.168.1.234", port=11000)]
260260
assert sync_status.zone == "Desk"
261261
assert sync_status.zone_leader
262-
assert sync_status.zone_follower
262+
assert sync_status.zone_follower is False
263263
assert sync_status.brand == "Bluesound"
264264
assert sync_status.model == "N130"
265265
assert sync_status.model_name == "NODE"

0 commit comments

Comments
 (0)