Replace wrong domain returned from xbox api revisited (#51074)
* Added replacement http to https Somehow the fix of replacing the domain doesn't work on android, so explicit replacement of http to https protocol is needed. * Update homeassistant/components/xbox/base_sensor.py Co-authored-by: Jason Hunter <hunterjm@gmail.com> Co-authored-by: Jason Hunter <hunterjm@gmail.com>
This commit is contained in:
parent
c302b5d4eb
commit
9b13350b01
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ class XboxBaseSensorEntity(CoordinatorEntity):
|
|||
# We need to also remove the 'mode=Padding' query because with it, it results in an error 400.
|
||||
url = URL(self.data.display_pic)
|
||||
if url.host == "images-eds.xboxlive.com":
|
||||
url = url.with_host("images-eds-ssl.xboxlive.com")
|
||||
url = url.with_host("images-eds-ssl.xboxlive.com").with_scheme("https")
|
||||
query = dict(url.query)
|
||||
query.pop("mode", None)
|
||||
return str(url.with_query(query))
|
||||
|
|
Loading…
Add table
Reference in a new issue