Skip to content

Commit b2ebdb7

Browse files
authored
Add friend location to Xbox integration (#155645)
1 parent 83d6a30 commit b2ebdb7

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

homeassistant/components/xbox/binary_sensor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def profile_attributes(person: Person, _: Title | None) -> dict[str, Any]:
5353
attributes["display_name"] = person.display_name
5454
attributes["real_name"] = person.real_name or None
5555
attributes["bio"] = person.detail.bio if person.detail else None
56+
attributes["location"] = person.detail.location if person.detail else None
5657
return attributes
5758

5859

homeassistant/components/xbox/strings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"state_attributes": {
4141
"bio": { "name": "Bio" },
4242
"display_name": { "name": "Display name" },
43+
"location": { "name": "Location" },
4344
"real_name": { "name": "Real name" }
4445
}
4546
}

tests/components/xbox/snapshots/test_binary_sensor.ambr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
'display_name': 'erics273',
4242
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=rwljod2fPqLqGP3DBV9F_yK9iuxAt3_MH6tcOnQXTc8LY1LO8JeulzCEFHaqqItKdg9oJ84qjO.VNwvUWuq_iR5iTyx1gQsqHSvWLbqIrRI-&background=0xababab&format=png',
4343
'friendly_name': 'erics273',
44+
'location': 'home',
4445
'real_name': None,
4546
}),
4647
'context': <ANY>,
@@ -189,6 +190,7 @@
189190
'display_name': 'GSR Ae',
190191
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=wHwbXKif8cus8csoZ03RW_ES.ojiJijNBGRVUbTnZKsoCCCkjlsEJrrMqDkYqs3M0aLOK2kxE9mbLm9M2.R0stAQYoDsGCDJxqDzG9WF3oa4rOCjEK7DbZXdBmBWnMrfErA3M_Q4y_mUTEQLqSAEeYFGlGeCXYsccnQMvEecxRg-&format=png',
191192
'friendly_name': 'GSR Ae',
193+
'location': None,
192194
'real_name': 'Test Test',
193195
}),
194196
'context': <ANY>,
@@ -337,6 +339,7 @@
337339
'display_name': 'Ikken Hissatsuu',
338340
'entity_picture': 'https://images-eds-ssl.xboxlive.com/image?url=7OTVnZUMVj4OV2zUUGecWvn3U00nQQLfK7_kwpANogj9vJpb.t4ZQMMLIWOuBZBBZs5MjD7okwh5Zwnit1SAtO3OAsFXxJc1ALIbaVoRo7gsiun9FdcaTpzkM60nqzT8ip1659eQpB1SLyupscP.ec_wAGvXwkhCcTKCNHQMrxg-&format=png',
339341
'friendly_name': 'Ikken Hissatsuu',
342+
'location': 'Rock Hill',
340343
'real_name': None,
341344
}),
342345
'context': <ANY>,

0 commit comments

Comments
 (0)