Hass.io Add-on: Xbox One

Is it just me, or is the home button in the media browser not visible in light themes. Even when using the default theme, I can only see it with dark mode. It would be great if it could use an MDI icon like the apps and games icons.


What would be the best way to sense the Xbox being turned on and off, I only need that functionality for an automation and the delays, 15 seconds for on and 30 for off, with this make it useless for that?

Unfortunately Xbox returns a white icon with a transparent background for that “app” and there isn’t much we can do about it in the current media browser implementation.

On/Off can be sensed the same way you would for any media player integration in your automations. Not sure what the ask is here.

As I said, the massive delay for the change of state to be reported makes this integration no use for what I need.

Found the answer…

…works perfectly and gives instant state changes.

1 Like

Care to share your automation use case? I’m trying to think through some automations myself.

i have same problem.
I use a automation for my xbox.
because the xbox does not support cec hdmi I use home assistant to controle this.

So:
xbox on
tv on - xbox on - tv to hdmi 2 -hue lights to xbox scene.

xbox off
tv to channel x - hue lights to normal.

But with the new integration the off monitor of the xbox takes to long.
i want the automation to start direct when I shutdown mij xbox. (old style)
Now I need to wait for 1 minut something.

also can not see witch game is in cover art.
I can see a app like Netflix. but I also liked the cover art of game that plays.

ps.
thanks for the good work you put in this project!

i’m getting a Not Secure warning in the web browser with the new Xbox integration when viewing home assistant via https.Is there the option to get Xbox integration images via https instead?

So @Bobby_Nobble thanks for that UPnp tip!
That works perfect! now my xbox turn off and instantly my tv go to channel X lights to setting X.

But is there a way to get that cover art back?!
So with apps it still works.
When I look @media player I can see a Netflix logo etc.
But in the old xbox entegration you could also see a House when you where in the dash.
Or you could see a picture for example Call of Duty (The game you would play)

This is not working for me anymore. Can this please be fixed. (or please let me know how to get this back)

2 Likes

@realm I miss it too. I had automation set up to change lights base on what was playing on Xbox and didn’t found a way to make it work again. Aso, I was able to get some statistics on how long each game was on.

The most important one for me is nothing special but as you asked :slight_smile:

My youngest is often falling asleep and leaving everything on (almost guaranteed when he’s Netflix and chilling!) as well as rubbish at turning things off when leaving his room. As the Xbox will turn itself off after half an hour of no interaction that’s not a problem but it means his monitor, speakers and fairy, sorry ambient, lights will stay on until whatever time he finally emerges the next day. So the OFF automation is simply sense the Xbox upnp goodbye message and flick the smart socket controlling the power strip everything else is plugged into and turn the lights off.

You could do that with the Xbox integration as reaction time is not important BUT when it does matter is when he turns the Xbox back on those other things need to come back to life at the same instant so the ON version of the automation senses the alive message which happens as soon as you turn it on as the Xbox is never really off.

Told you it wasn’t sexy but does an important job for me :slight_smile:

Could you not install the old one as a custom_component?

I have had the same issue. In my case I found that my cable box remote would send out the right IR signals at times. “push the volume up button too quickly it would turn on”

Hello all,

My xbox integration had been working flawlessly until around 0.118.1 but has since stopped working.

I have tried removing and re-adding the integration but am receiving the following errors:

Logger: homeassistant.components.media_player
Source: components/xbox/media_player.py:101
Integration: Media player ([documentation](https://www.home-assistant.io/integrations/media_player), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+media_player%22))
First occurred: 2:48:22 PM (4 occurrences)
Last logged: 2:56:33 PM

* Error adding entities for domain media_player with platform xbox
* Error while setting up xbox platform for media_player

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 422, in _async_add_entity capabilities=entity.capability_attributes, File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 814, in capability_attributes supported_features = self.supported_features or 0 File "/usr/src/homeassistant/homeassistant/components/xbox/media_player.py", line 114, in supported_features if self.state not in [STATE_PLAYING, STATE_PAUSED]: File "/usr/src/homeassistant/homeassistant/components/xbox/media_player.py", line 106, in state status = self.data.status File "/usr/src/homeassistant/homeassistant/components/xbox/media_player.py", line 101, in data return self.coordinator.data.consoles[self._console.id] KeyError: 'FD0066626A92A956'

and

Logger: homeassistant.components.xbox
Source: components/xbox/__init__.py:231
Integration: Xbox ([documentation](https://www.home-assistant.io/integrations/xbox), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+xbox%22))
First occurred: 2:46:49 PM (1914 occurrences)
Last logged: 8:06:33 PM

Unexpected error fetching xbox data: 1 validation error for PeopleResponse people -> 0 -> linkedAccounts -> 0 -> displayName none is not an allowed value (type=type_error.none.not_allowed)

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/components/xbox/__init__.py", line 231, in _async_update_data batch: PeopleResponse = await self.client.people.get_friends_own_batch( File "/usr/local/lib/python3.8/site-packages/xbox/webapi/api/provider/people/__init__.py", line 107, in get_friends_own_batch return PeopleResponse.parse_raw(await resp.text()) File "/usr/local/lib/python3.8/site-packages/pydantic/main.py", line 538, in parse_raw return cls.parse_obj(obj) File "/usr/local/lib/python3.8/site-packages/pydantic/main.py", line 515, in parse_obj return cls(**obj) File "/usr/local/lib/python3.8/site-packages/pydantic/main.py", line 362, in __init__ raise validation_error pydantic.error_wrappers.ValidationError: 1 validation error for PeopleResponse people -> 0 -> linkedAccounts -> 0 -> displayName none is not an allowed value (type=type_error.none.not_allowed)

Any thoughts?

Thanks!

1 Like

Don’t suppose you had a fix for this? I’ve got the exact same problem

I’m still stuck with the same problem. No fix as of yet.

I have switched to the native integration in Hass.io and works with no problem check it here:
Xbox - Home Assistant (home-assistant.io)
The only downside is that player does not show if the game is playing., but you can switch Xbox on and of even start game or app.

Just wanted to confirm that I am in fact using the latest native integration via Home Assistant. This is the platform that is currently not working for me (producing the errors mentioned above).

@hunterjm - Any thoughts on the errors that myself and @davepw4 are seeing?

1 Like

I am also using the latest native integration. It worked the first time, then stopped working around the time I went to version 118.