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

Opower: Comed login fails due to 400 Error #134050

Open
Draw19Cards opened this issue Dec 26, 2024 · 1 comment
Open

Opower: Comed login fails due to 400 Error #134050

Draw19Cards opened this issue Dec 26, 2024 · 1 comment
Assignees

Comments

@Draw19Cards
Copy link

The problem

Trying to log into Comed with the Opower integration causes an 400 error in the logs

What version of Home Assistant Core has the issue?

core-2024.12.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Opower

Link to integration documentation on our website

https://www.home-assistant.io/integrations/opower

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/opower/opower.py", line 199, in async_login
    self.access_token = await self.utility.async_login(
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        self.session, self.username, self.password, self.optional_mfa_secret
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/opower/utilities/exelon.py", line 209, in async_login
    async with session.post(
               ~~~~~~~~~~~~^
        "https://"
        ^^^^^^^^^^
    ...<4 lines>...
        raise_for_status=True,
        ^^^^^^^^^^^^^^^^^^^^^^
    ) as resp:
    ^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 1425, in __aenter__
    self._resp: _RetType = await self._coro
                           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 834, in _request
    resp.raise_for_status()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 1161, in raise_for_status
    raise ClientResponseError(
    ...<5 lines>...
    )
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url='https://secure.comed.com/api/Services/OpowerService.svc/GetOpowerToken'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/opower/config_flow.py", line 50, in _validate_login
    await api.async_login()
  File "/usr/local/lib/python3.13/site-packages/opower/opower.py", line 207, in async_login
    raise CannotConnect(err)
opower.exceptions.CannotConnect: 400, message='Bad Request', url='https://secure.comed.com/api/Services/OpowerService.svc/GetOpowerToken'

Additional information

No response

@home-assistant
Copy link

Hey there @tronikos, mind taking a look at this issue as it has been labeled with an integration (opower) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of opower can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign opower Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


opower documentation
opower source
(message by IssueLinks)

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

No branches or pull requests

2 participants