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

Generate random tagId used to start transaction from UI #1302

Merged
merged 1 commit into from
Sep 8, 2024

Conversation

rinigus
Copy link
Collaborator

@rinigus rinigus commented Sep 2, 2024

Instead of disabling authorization for start_transaction initiated via HA user, use a random generated tag and authorize it to start transaction.

This PR started as the following code was not disabling authorization on ABB charger:

        resp = await self.get_configuration(ckey.authorize_remote_tx_requests.value)
        if resp is True:
            await self.configure(ckey.authorize_remote_tx_requests.value, "false")

I presume it is due to comparison between resp and True (is resp a string?).

However, we don't even have to disable authorization in this case. It is sufficient to generate a random tag on initialization and use it for such transactions.

Instead of disabling authorization for start_transaction initiated
via HA user, use a random generated tag and authorize it to start
transaction
@rinigus rinigus temporarily deployed to continuous-integration September 2, 2024 19:03 — with GitHub Actions Inactive
Copy link

codecov bot commented Sep 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.30%. Comparing base (d8f4b7e) to head (074205d).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1302      +/-   ##
==========================================
+ Coverage   91.10%   91.30%   +0.19%     
==========================================
  Files           9        9              
  Lines        1383     1391       +8     
  Branches      222      223       +1     
==========================================
+ Hits         1260     1270      +10     
+ Misses         66       65       -1     
+ Partials       57       56       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lbbrhzn lbbrhzn merged commit 93b0cc8 into lbbrhzn:main Sep 8, 2024
8 checks passed
@rinigus rinigus deleted the auth-remote branch September 8, 2024 09:06
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