Repository: alandtse/alexa_media_player

Issue #866: Config entry has already been setup!
Created: 2020-08-15T12:28:11Z
Describe the bug
Every time when HA restarted have error on Log:
2020-08-15 06:42:33 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry xxxxxxxx@gmail.com - amazon.com for media_player
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 222, in async_setup
result = await component.async_setup_entry(  # type: ignore
File "/usr/src/homeassistant/homeassistant/components/media_player/init.py", line 334, in async_setup_entry
return await hass.data[DOMAIN].async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 159, in async_setup_entry
raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2020-08-15 06:42:33 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry xxxxxxxx@gmail.com - amazon.com for media_player
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 222, in async_setup
result = await component.async_setup_entry(  # type: ignore
File "/usr/src/homeassistant/homeassistant/components/media_player/init.py", line 334, in async_setup_entry
return await hass.data[DOMAIN].async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 159, in async_setup_entry
raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
System details

Home-assistant (version): Home Assistant 0.114.1
System | HassOS 5.0
Supervisor Version 234
Hassio (Yes/No): (Please note you may have to restart hassio 2-3 times to load the latest version of alexapy after an update. This looks like a HA bug).
alexa_media  (version from const.py or HA startup): v2.10.1

Logs
Please provide logs. We'll be most likely asking for them anyway.
2020-08-15 06:42:33 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry xxxxxxxx@gmail.com - amazon.com for media_player
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 222, in async_setup
result = await component.async_setup_entry(  # type: ignore
File "/usr/src/homeassistant/homeassistant/components/media_player/init.py", line 334, in async_setup_entry
return await hass.data[DOMAIN].async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 159, in async_setup_entry
raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
2020-08-15 06:42:33 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry xxxxxxxx@gmail.com - amazon.com for media_player
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 222, in async_setup
result = await component.async_setup_entry(  # type: ignore
File "/usr/src/homeassistant/homeassistant/components/media_player/init.py", line 334, in async_setup_entry
return await hass.data[DOMAIN].async_setup_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 159, in async_setup_entry
raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!
Additional context
Add any other context about the problem here.

Duplicate issue #1057: ValueError: Config entry has already been setup!
Created: 2020-12-24T22:21:53Z
Alexa Media Player: 3.4.1
HA:  2020.12.7
I receive those errors many times. What can this be?
2020-12-24 22:58:29 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry info@mydomain.com - amazon.co.uk for media_player
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 345, in async_setup_entry
    return await hass.data[DOMAIN].async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 155, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!

2020-12-24 23:08:30 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry info@mydomain.com - amazon.co.uk for media_player
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 345, in async_setup_entry
    return await hass.data[DOMAIN].async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 155, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!

2020-12-24 23:18:31 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry info@mydomain.com - amazon.co.uk for media_player
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 236, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 345, in async_setup_entry
    return await hass.data[DOMAIN].async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 155, in async_setup_entry
    raise ValueError("Config entry has already been setup!")
ValueError: Config entry has already been setup!

Closing comment (2020-12-27T21:06:37Z): Dupe of #866. Also please fill out the template if you want assistance.