Skip to content

Conversation

generalmat82
Copy link

@generalmat82 generalmat82 commented Oct 7, 2025

Since API passwords are deprecated, I added information about using API encryption keys, instead of API Passwords to the readme file.

What does this implement/fix?

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code quality improvements to existing code or addition of tests
  • Other

Related issue or feature (if applicable):

  • fixes

Pull request in esphome (if applicable):

  • esphome/esphome#

Checklist:

  • The code change is tested and works locally.
  • If api.proto was modified, a linked pull request has been made to esphome with the same changes.
  • Tests have been added to verify that the new code works (under tests/ folder).

generalmat82 and others added 2 commits October 7, 2025 00:18
Since API passwords are deprecated, I added information about using API encryption keys, instead of API Passwords to the readme file.
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (cfdb7a4) to head (40b9c39).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1382   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines         3287      3287           
=========================================
  Hits          3287      3287           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

coderabbitai bot commented Oct 7, 2025

Walkthrough

Updated README.rst to document deprecation of API passwords in favor of an encryption key (noise_psk), add a YAML configuration snippet, and provide updated APIClient usage examples for password/key and no-password flows. No code or control-flow changes.

Changes

Cohort / File(s) Change summary
Docs: Auth guidance and examples
README.rst
Added deprecation notice for API passwords and guidance for using an encryption key (noise_psk). Added YAML config snippet and updated APIClient usage examples showing password-with-noise_psk, key-based, and no-password variants; clarified connection and state-subscription samples. No logic changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the primary change to the README regarding API password deprecation without extraneous details.
Description Check ✅ Passed The description clearly states that documentation was updated to reflect API password deprecation and use of encryption keys, matching the changes in the README.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f135d74 and 848b3f8.

📒 Files selected for processing (1)
  • README.rst (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.rst
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Run benchmarks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

codspeed-hq bot commented Oct 7, 2025

CodSpeed Performance Report

Merging #1382 will not alter performance

Comparing generalmat82:patch-1 (40b9c39) with main (cfdb7a4)1

Summary

✅ 11 untouched

Footnotes

  1. No successful run was found on main (ea093a6) during the generation of this report, so cfdb7a4 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a57081 and c7f8a6f.

📒 Files selected for processing (1)
  • README.rst (3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

  • Do not generate or add any sequence diagrams

Files:

  • README.rst

Fixed typos mentioned by @coderabbitai
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
README.rst (1)

68-104: Polish the new Python examples for readability.

Add the missing spaces after commas and in the comments so the snippets follow the style used elsewhere in the README.

-       # If a password is used in the ESP configuration use the following line:
-       api = aioesphomeapi.APIClient("api_test.local", 6053, "MyPassword",noise_psk='aaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaa=')
+       # If a password is used in the ESP configuration, use the following line:
+       api = aioesphomeapi.APIClient("api_test.local", 6053, "MyPassword", noise_psk='aaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaa=')
        # OR
-       #If there is no password used in the ESP configuration:
-       api = aioesphomeapi.APIClient("api_test.local", 6053, None,noise_psk='aaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaa=')
+       # If there is no password used in the ESP configuration:
+       api = aioesphomeapi.APIClient("api_test.local", 6053, None, noise_psk='aaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaa=')
@@
-       # If a password is used in the ESP configuration use the following line:
-       cli = aioesphomeapi.APIClient("api_test.local", 6053, "MyPassword",noise_psk='aaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaa=')
+       # If a password is used in the ESP configuration, use the following line:
+       cli = aioesphomeapi.APIClient("api_test.local", 6053, "MyPassword", noise_psk='aaaaaaaaaaaaaaaaa/aaaaaaaaaaaaaaaaaaaaaaaaa=')
        # OR
-       #If there is no password used in the ESP configuration:
+       # If there is no password used in the ESP configuration:
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c7f8a6f and f135d74.

📒 Files selected for processing (1)
  • README.rst (3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

  • Do not generate or add any sequence diagrams

Files:

  • README.rst
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: py 3.12 on windows-latest (skip_cython)
  • GitHub Check: Run benchmarks

Applying deprecation message in ESPHome api config as proposed by @coderabbitai 
Also added info about the usage of the `noise_psk` option.
@generalmat82
Copy link
Author

Real dumb question here. I never made a pull request on public repos before.
I've seen other request where the author of it marked it as "ready for review" or something, do I need to do that, if so how? Like how can I make the change into the main branch?
Really sorry if this is a stupid question.

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.

1 participant