Opower Evergy Unknown Error at setup

Trying to set up OPower for Evergy, but it just throws “Unknown error occurred”

I can log into Evergy web page no problem.
No idea where to go to troubleshoot this.
Ideas?

Core Log:

Logger: aiohttp.server
Source: /usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py:481
First occurred: 8:43:04 PM (9 occurrences)
Last logged: 9:21:53 PM

Error handling request from 172.28.3.2
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/web_protocol.py", line 510, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/web_app.py", line 569, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 41, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 83, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 227, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper
    return await method(view, request, data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 121, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 336, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 383, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        flow, cur_step["step_id"], user_input
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 487, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/opower/config_flow.py", line 88, in async_step_user
    errors = await _validate_login(self.hass, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/opower/config_flow.py", line 51, in _validate_login
    await api.async_login()
  File "/usr/local/lib/python3.13/site-packages/opower/opower.py", line 200, 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/evergy.py", line 70, in async_login
    login_parser.verification_token
AssertionError: Failed to parse login verification token

Same issue here

I have had this setup successfully in the past. However, within the last few upgrades to Home Assistant, I have started receiving this error. I am wondering if there is some new compatibility error in 2025.7.X?

UPDATE: I just found this as it appears to be a bug with updates to Evergy’s interface. Evergy not working for Midwest region · Issue #149552 · home-assistant/core · GitHub

Thanks for this post…I thought it was because I added MFA…then I noticed I was missing data for several days. Tried a password reset, disabled MFA, etc. and found thread. :slight_smile:

Just got a different error about session expiration – different can be better, right (?) --kinda hoped something was working again due to some recent update. Nope. Still, I checked github for any updates and . . . github is down for me. :frowning:

I’m starting to get the idea that this may not be a fixable problem from the home assistant POV.

Mine has been working good for sometime, but about a week ago or so, it was no longer retrieving data from Evergy. I don’t recall the error, but the way I fixed it was logging into Evergy’s website (just in a browser window–nothing in HA)–it seemed to clear up the error. I don’t understand why that would work, but it did (coincidence?). Let me know if you try that and it works.

I wondered about that too with the error I got, so I went and logged in to my KCPL^B^B^B^B Evergy account on the web. I got logged in, but no luck, nothing changed back in HA. :frowning:

I had the issue with not being able to login to Evergy. It kept sending me texts with MFA codes to type in. I went in, reset MFA settings, logged out, logged in, said NO to setting up MFA. Then went back to HA and logged back in, took about a minute but it worked!

i can confirm this works. in my case i had to log in and out on one browser. then i used a second browser to log in and confirm no MFA.