hunterjm / hassio-addons

Control your Xbox One from your Home Assistant device.
MIT License
55 stars 50 forks source link

0.92 and problems #43

Closed sagitt closed 7 months ago

sagitt commented 5 years ago

After update i see this!

Integration xboxone not found when trying to verify its media_player platform.

XelandOne commented 5 years ago

I ran into the same problem with HA 0.92 installed. It probably has something to do with the new way of how Integrations are structured (https://developers.home-assistant.io/blog/2019/04/12/new-integration-structure.html). Should the path be /config/custom_components/xboxone/media_player.py/ or /config/custom_components/media_player/xboxone/ ?

sagitt commented 5 years ago

Maybe “create an empty init.py file ”

sagitt commented 5 years ago

Yes creating the empty init file all works...... please update this plugin for this new standard.

mirkochip88 commented 5 years ago

I've made a pull request

SeraphimSerapis commented 5 years ago

The component should also define a DOMAIN as listed here.

Furthermore, state updates are handled differently now:

Updating state for media_player.xbox_one (<class 'custom_components.xboxone.media_player.XboxOneDevice'>) took 0.699 seconds. Please report platform to the developers at https://goo.gl/Nvioub
GsynthChris commented 5 years ago

Yes creating the empty init file all works...... please update this plugin for this new standard.

where do we drop the empty init.py file?

sagitt commented 5 years ago

Yes creating the empty init file all works...... please update this plugin for this new standard.

where do we drop the empty init.py file?

in custom_components/xboxone/

GsynthChris commented 5 years ago

hmm. thats what I thought. I tried that and I still get an error. I tried init.py and even init.py cause all the other ones look like that hahaha

"Integration xboxone not found when trying to verify its media_player platform."

SeraphimSerapis commented 5 years ago

It needs to be __init__.py

GsynthChris commented 5 years ago

I tried init.py and even __init__.py and neither resolved it. I am still getting ERROR (MainThread) [homeassistant.components.hassio] Integration xboxone not found when trying to verify its media_player platform. and the media player isn't showing up.

:-(

SeraphimSerapis commented 5 years ago

Check out my comment above. You may have to define a domain, too. Just use xbox_one as value.

mirkochip88 commented 5 years ago

To me void __init__.py works.

GsynthChris commented 5 years ago

I tried the domain thing and a blank __init__.py

I wish I know what the heck I was doing wrong. :-(

GsynthChris commented 5 years ago

I figured it out! According to this post: https://github.com/home-assistant/home-assistant/issues/23418 you need to change any SUPPORT_VOLUME_STEP in your media_player.py to SUPPORT_VOLUME_SET

I was so skeptical but as soon as I did it I checked config and it passed. I restarted and everything started working. YAYAYAYAYAYAYAY!!!!!

SeraphimSerapis commented 5 years ago

Interesting -- I didn't make these changes and it runs flawlessly on 0.92.1 for me. Will see if I can change volume when I am back home.

GsynthChris commented 5 years ago

yeah idk why we had different experiences. very strange!

sk1ppy81 commented 5 years ago

This is what I did to get it to work with 0.92.2 Edit the file media_player.py and Change any SUPPORT_VOLUME_STEP in SUPPORT_VOLUME_SET Add an Emptyinit.py in the same directory Add manifest.json with the following content to the same directory

{ "domain": "xboxone", "name": "Xboxone", "documentation": "https://github.com/hunterjm/hassio-addons", "dependencies": [], "codeowners": [], "requirements": [] }

Restarted Home assistant after checking config validation. It all started to work again

tierant5 commented 5 years ago

I can confirm adding the blank __init__.py file under custom_components/xboxone and putting DOMAIN = 'xbox_one' inside the media_player.py file gets the component working again in 0.92.2. Thank you @SeraphimSerapis !

michaelblight commented 5 years ago

I was confused about the media_player.py reference. For anyone else still struggling like me, you need to create 3 files:

jackkitley commented 4 years ago

Is this still valid with latest version? 0.98.5

tibzz42 commented 4 years ago

Hi there. This fix doesnt seems to work anymore on 0.100.3... Does anyone find a way to solve it ? I try to apply what @michaelblight said, but i still have the error message when check the configuration file :(

ccoombes commented 4 years ago

Just tried this on 0.103.5, will all the above fixes I'm still getting the "Platform error media_player.xboxone - Integration 'xboxone' not found." error. Does anyone have a fix for this?