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

Durable authentication implementation + Multiple fixes to current functionalities #4

Merged
merged 11 commits into from
Apr 9, 2023
Merged

Conversation

etmelvin
Copy link

@etmelvin etmelvin commented Apr 5, 2023

  • Implemented durable authentication described in this issue: Need to provide durable authentication galak/span-hacs#11
    • Config flow now directs user to open/close their Span Panel to get temporary authorization for access token request
    • Subsequent requests to the Span Panel uses that access token
  • We now check for invalid responses from Span Panel before passing that over to Home Assistant
    • Your energy dashboard should no longer record 0 when that happens, instead it’ll just ignore that update loop
  • Fix an issue with the button toggle and priority selector not working properly
    • There is a API change where the payload key was changed from snake_case to lowerCamelCase
    • I couldn’t validate that priority selector is working properly after the fix as I’m getting strange 500 errors, this might be because I don’t have batteries for my system; I can’t change those values from their app either
  • Did some refactoring too based on python standard black + isort

Copy link
Owner

@gdgib gdgib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested working for me, with the exception of the same 500 errors. I agree with the guess that those are related to not having a battery, as I can confirm the very same 500 error is returned to the SPAN built-in web-app. In any case, that sure proves this isn't your/our fault.

This is nice work @etmelvin ! Thank you very much.

@gdgib gdgib merged commit be16496 into gdgib:main Apr 9, 2023
@gdgib gdgib added this to the 0.0.6 milestone Apr 9, 2023
@gdgib gdgib self-assigned this Apr 9, 2023
gdgib pushed a commit that referenced this pull request Jan 15, 2024
added backwards compatible firmware logic
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

Successfully merging this pull request may close these issues.

3 participants