Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to control devices in Dutch language #2480

Open
GJurriens opened this issue Aug 23, 2024 · 6 comments
Open

Unable to control devices in Dutch language #2480

GJurriens opened this issue Aug 23, 2024 · 6 comments

Comments

@GJurriens
Copy link

GJurriens commented Aug 23, 2024

IMPORTANT: Please search the issues, including closed issues, and the FAQ before opening a new issue. The template is mandatory; failure to use it will result in issue closure.

Describe the bug

When an Alexa device is set to Dutch language, you cannot control it or see any status updates. The devices get detected but every entity shows as unavailable

To Reproduce

Set a device to use the Dutch language and check after configuring the integration. English language devices are normally detected and are able to be operated, Dutch devices do show up, but all operations are not available

Expected behavior

To be able to see the status of and controll when the device is in Dutch language.

Screenshots

image

System details

  • Home Assistant version: 2024.8.2
  • alexa_media version (from const.py or HA startup log): 4.12.10
  • alexapy version (from pip show alexapy in homeasssistant container or HA startup log):
  • Is Amazon 2FA/2SV enabled <!---We will not debug login issues if unanswered---> (y/n): yes
  • Amazon Domain: amazon.nl

Debug Logs (alexa_media & alexapy)
Please provide logs.

Additional context

Dutch language support has just gone generally available, so maybe that is why it does not work yet.

@danielbrunt57
Copy link
Collaborator

danielbrunt57 commented Aug 23, 2024

Dutch language support has just gone generally available, so maybe that is why it does not work yet.

@GJurriens I think const.py in alexapy might need updating:

LOCALE_KEY = {
    ".de": "de_DE",
    ".com.au": "en_AU",
    ".ca": "en_CA",
    ".co.uk": "en_GB",
    ".in": "en_IN",
    ".com": "en_US",
    ".es": "es_ES",
    ".mx": "es_MX",
    ".fr": "fr_FR",
    ".it": "it_IT",
    ".co.jp": "ja_JP",
    ".com.br": "pt_BR",
}

@GJurriens
Copy link
Author

Thank you for your response danielbrunt57. I have tried adding ".nl": "nl_NL", to the locale key, but that didn't seem to help.

When I check the log, I see the following:
Logger: homeassistant.config_entries
Bron: config_entries.py:604
Eerst voorgekomen: 12:49:51 (1 gebeurtenissen)
Laatst gelogd: 12:49:51

Error setting up entry [email protected] - amazon.nl for alexa_media
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/alexa_media/init.py", line 360, in async_setup_entry
await login.login(cookies=await login.load_cookie())
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/alexapy/alexalogin.py", line 328, in load_cookie
cookies = pickle.loads(await myfile.read())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/http/cookies.py", line 312, in setitem
raise CookieError("Invalid attribute %r" % (K,))
http.cookies.CookieError: Invalid attribute 'partitioned'

@GJurriens
Copy link
Author

home-assistant_alexa_media_2024-08-24T10-52-50.335Z.log
Also, this is the debug logging.

@danielbrunt57
Copy link
Collaborator

File "/usr/local/lib/python3.12/http/cookies.py", line 312, in setitem
raise CookieError("Invalid attribute %r" % (K,))
http.cookies.CookieError: Invalid attribute 'partitioned'

@GJurriens You need to replace the python3.12/http/cookies.py with the one from Python 3.13 beta PR gh-112713 which will add support for the new Partitioned attribute in the Morsel object in http.cookies.

Copy link

The issue has received no activity for 60 days and will be closed in a week.

@danielbrunt57
Copy link
Collaborator

@GJurriens Is this still an issue for you on current versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants