hassio-addons icon indicating copy to clipboard operation
hassio-addons copied to clipboard

0.92 and problems

Open sagitt opened this issue 5 years ago • 22 comments

After update i see this!

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

sagitt avatar Apr 25 '19 17:04 sagitt

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/ ?

XelandOne avatar Apr 26 '19 08:04 XelandOne

Maybe “create an empty init.py file ”

sagitt avatar Apr 26 '19 11:04 sagitt

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

sagitt avatar Apr 26 '19 11:04 sagitt

I've made a pull request

mirkochip88 avatar Apr 26 '19 16:04 mirkochip88

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

SeraphimSerapis avatar Apr 27 '19 13:04 SeraphimSerapis

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?

GsynthChris avatar Apr 27 '19 23:04 GsynthChris

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/

sagitt avatar Apr 27 '19 23:04 sagitt

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."

GsynthChris avatar Apr 27 '19 23:04 GsynthChris

It needs to be __init__.py

SeraphimSerapis avatar Apr 28 '19 09:04 SeraphimSerapis

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.

:-(

GsynthChris avatar Apr 29 '19 11:04 GsynthChris

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

SeraphimSerapis avatar Apr 29 '19 13:04 SeraphimSerapis

To me void __init__.py works.

mirkochip88 avatar Apr 29 '19 13:04 mirkochip88

I tried the domain thing and a blank __init__.py

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

GsynthChris avatar Apr 30 '19 02:04 GsynthChris

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!!!!!

GsynthChris avatar Apr 30 '19 02:04 GsynthChris

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.

SeraphimSerapis avatar Apr 30 '19 06:04 SeraphimSerapis

yeah idk why we had different experiences. very strange!

GsynthChris avatar May 01 '19 02:05 GsynthChris

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 Empty__init__.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

sk1ppy81 avatar May 05 '19 18:05 sk1ppy81

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 !

tierant5 avatar May 10 '19 23:05 tierant5

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

  • custom_components/xboxone/__init__.py with no content.
  • custom_components/xboxone/media_player.py with the content copied from the add-on's xboxone.py. And then change the 3 occurrences of SUPPORT_VOLUME_STEP to SUPPORT_VOLUME_SET and add another line with DOMAIN = 'xbox_one' (I put it at line 40).
  • custom_components/xboxone/manifest.json with content below
{
  "domain": "xboxone",
  "name": "Xboxone",
  "documentation": "https://github.com/hunterjm/hassio-addons",
  "dependencies": [],
  "codeowners": [],
  "requirements": []
}

You should then be able to "Check config" and have it pass.

michaelblight avatar Jul 03 '19 09:07 michaelblight

Is this still valid with latest version? 0.98.5

jackkitley avatar Sep 16 '19 14:09 jackkitley

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 :(

tibzz42 avatar Nov 11 '19 08:11 tibzz42

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?

ccoombes avatar Jan 07 '20 12:01 ccoombes