LordBoos / discord_game

Home Assistant custom component to get online and game status of Discord users
MIT License
56 stars 7 forks source link

Requirements conflict with Home Assistant Discord notification integration #6

Closed xiidoz closed 4 years ago

xiidoz commented 4 years ago

Applies to:

If you are using the Home Assistant Discord integration for notifications, discord.py v. 1.2.5 gets loaded, even though discord_game requires a newer version of discord.py.

Until the new version is officially released and the Home Assistant integration is updated, the following workaround can be applied:

Create a folder discord under custom_components and copy the files from https://github.com/home-assistant/home-assistant/tree/dev/homeassistant/components/discord in that folder. Update the manifest.json to use the newer version of discord.py, so that the file looks like this:

{
  "domain": "discord",
  "name": "Discord",
  "documentation": "https://www.home-assistant.io/integrations/discord",
  "requirements": ["git+https://github.com/Rapptz/discord.py@23f16618fdf5fcbeeefed7acb56b579e74bc88d8#discord.py==1.6.0"],
  "dependencies": [],
  "codeowners": []
}

Restart Home Assistant and both Discord integrations should be working as intended.

LordBoos commented 4 years ago

Can you please test the new version 3.0.3? Discord.py library update was released. Official component still uses 1.2.5, but it might work. If not, the official component will have new Discord.py library in the next version, as it was already merged to their code: https://github.com/home-assistant/home-assistant/pull/31391

xiidoz commented 4 years ago

It does work under home assistant dev branch without any workaround. We can close this Issue as soon as home-assistant/home-assistant#31391 gets merged to master.

⚠ The version conflict between home assistant's current release (0.104.4) still exists, as home assistant force loads discord.py v. 1.2.5, which is incompatible with discord_game v. 3.0.2 and 3.0.3

xiidoz commented 4 years ago

Is now solved with home assistant 0.106.0.