Skip to content

[wifi_info] Add IP address text sensor#68

Merged
bharvey88 merged 1 commit intobetafrom
wifi-info-ip-address
Feb 27, 2026
Merged

[wifi_info] Add IP address text sensor#68
bharvey88 merged 1 commit intobetafrom
wifi-info-ip-address

Conversation

@bharvey88
Copy link
Copy Markdown
Contributor

@bharvey88 bharvey88 commented Feb 24, 2026

Version: 25.7.18.1

What does this implement/fix?

Adds the device's current IP address as a diagnostic text sensor in Home Assistant.

This makes it easy to identify and connect to individual MSR-1 devices on the network without having to check the router.

Types of changes

  • Bugfix (fixed change that fixes an issue)
  • New feature (thanks!)
  • Breaking change (repair/feature that breaks existing functionality)
  • Dependency Update - Does not publish
  • Other - Does not publish
  • Website of github readme file update - Does not publish
  • Github workflows - Does not publish

Checklist / Checklijst:

  • The code change has been tested and works locally
  • The code change has not yet been tested

If user-visible functionality or configuration variables are added/modified:

  • Added/updated documentation for the web page

Summary by CodeRabbit

  • New Features
    • Added a Wi‑Fi IP Address sensor to display the device's current network IP for easier identification and connectivity checks.
    • Added an ESPHome Version sensor to surface the installed ESPHome release as a diagnostic.
    • Added an "Apollo Firmware Version" template sensor to expose firmware version details as a diagnostic.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 24, 2026

Warning

Rate limit exceeded

@bharvey88 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 59 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between fa86ec8 and 75caa29.

📒 Files selected for processing (1)
  • Integrations/ESPHome/Core.yaml

Walkthrough

Added three diagnostic text sensors to the ESPHome config: a wifi_info IP address sensor, an ESPHome version sensor, and a template sensor exposing "Apollo Firmware Version" via a lambda (update_interval: never).

Changes

Cohort / File(s) Summary
ESPHome Configuration
Integrations/ESPHome/Core.yaml
Added text_sensor entries: wifi_info with ip_address sensor (id: wifi_ip, name: "IP Address", entity_category: "diagnostic"); version platform exposing "ESPHome Version" (diagnostic); and a template text_sensor apollo_firmware_version returning JSON via a lambda with update_interval: never (diagnostic).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through YAML, quick and spry,
I added versions, IPs — oh my!
Apollo's tale in JSON spun,
Diagnostics ready — hop, we're done! 🐇📡

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '[wifi_info] Add IP address text sensor' directly aligns with the primary change in the PR—adding an IP address sensor via the wifi_info platform. It accurately reflects the main objective and is concise.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch wifi-info-ip-address

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
Copy Markdown

@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.

🧹 Nitpick comments (1)
Integrations/ESPHome/Core.yaml (1)

652-655: Explicitly mark the IP sensor as diagnostic

ESPHome does not automatically set entity_category: diagnostic for wifi_info.ip_address—it must be explicitly configured. Add entity_category: diagnostic to match the PR objective and ensure consistent behavior across ESPHome versions.

Suggested change
   - platform: wifi_info
     ip_address:
       name: "IP Address"
       id: wifi_ip
+      entity_category: diagnostic
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Integrations/ESPHome/Core.yaml` around lines 652 - 655, The IP address sensor
definition for wifi_info (the ip_address block defining name "IP Address" and id
wifi_ip) needs to explicitly set entity_category to diagnostic; update the
ip_address sensor (wifi_info.ip_address) to include entity_category: diagnostic
so the sensor is marked as a diagnostic entity across ESPHome versions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Integrations/ESPHome/Core.yaml`:
- Around line 652-655: The IP address sensor definition for wifi_info (the
ip_address block defining name "IP Address" and id wifi_ip) needs to explicitly
set entity_category to diagnostic; update the ip_address sensor
(wifi_info.ip_address) to include entity_category: diagnostic so the sensor is
marked as a diagnostic entity across ESPHome versions.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8522ad8 and 1df3fad.

📒 Files selected for processing (1)
  • Integrations/ESPHome/Core.yaml

@TrevorSchirmer
Copy link
Copy Markdown
Member

Conflict

Copy link
Copy Markdown

@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.

🧹 Nitpick comments (1)
Integrations/ESPHome/Core.yaml (1)

661-667: Consider simplifying the lambda return syntax.

The current brace initialization return {"${version}"}; works correctly but is slightly unconventional. A more idiomatic approach would be to return the string directly.

♻️ Simplified lambda syntax
   lambda: |-
-    return {"${version}"};
+    return "${version}";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Integrations/ESPHome/Core.yaml` around lines 661 - 667, The lambda for the
template sensor apollo_firmware_version uses brace-initialization; change the
lambda in the template platform (id: apollo_firmware_version, name: "Apollo
Firmware Version") to return the string directly by replacing the current return
expression with a direct string return (i.e., return "${version}";) so the
lambda is idiomatic and clearer.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Integrations/ESPHome/Core.yaml`:
- Around line 661-667: The lambda for the template sensor
apollo_firmware_version uses brace-initialization; change the lambda in the
template platform (id: apollo_firmware_version, name: "Apollo Firmware Version")
to return the string directly by replacing the current return expression with a
direct string return (i.e., return "${version}";) so the lambda is idiomatic and
clearer.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1df3fad and fa86ec8.

📒 Files selected for processing (1)
  • Integrations/ESPHome/Core.yaml

@bharvey88 bharvey88 force-pushed the wifi-info-ip-address branch from fa86ec8 to 75caa29 Compare February 27, 2026 18:58
@bharvey88 bharvey88 merged commit 81535a9 into beta Feb 27, 2026
11 checks passed
@bharvey88 bharvey88 deleted the wifi-info-ip-address branch February 27, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants