Closed mark-ignacio closed 11 months ago
Could you please take a look at my most recent refactoring? I tried to address an issue that Home Assistant doesn't like modifying default headers since the same session is used across different integrations but it looks like I broke Evergy and likely other utilities. My utility is PG&E that is the only one not using access token. See some details in https://github.com/home-assistant/core/issues/97655#issuecomment-1663209206
Never mind. The issue was fixed in https://github.com/tronikos/opower/commit/e8d88d315829169789270b1eaf8bcd78342306d3
@mark-ignacio Thanks for catching this and coding the fix. I had no idea that's why the subdomain wasn't kcpl
for me (on the KS side).
Detects the Evergy subdomain by hitting an API after logging in.
This also emits a debug log about the detected subdomain, as well as a warning level log when it sees a subdomain that Evergy is not known to use (which would probably only happen if it expands to a different state?).
closes #10