Skip to content

Show uptime as readable text - #128

Closed
bharvey88 wants to merge 1 commit into
betafrom
readable-uptime
Closed

bharvey88 wants to merge 1 commit into
betafrom
readable-uptime

Conversation

@bharvey88

@bharvey88 bharvey88 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Version: 26.9.29.1

What does this implement/fix?

Replaces the numeric Uptime sensor with ESPHome's built-in uptime text sensor, so Home Assistant shows uptime as 3d 4h 12m instead of a raw count of seconds. Thanks to @kernelpanic85 for the idea in ApolloAutomation/R_PRO-1#72.

  • Uptime is now a text entity. Its history graph and long-term statistics stop, and any automation or template that treats uptime as a number needs updating.
  • Home Assistant sees it as a new entity. The old numeric Uptime entity will show as unavailable and can be deleted.
  • The ID stays sys_uptime, so component.update: sys_uptime in the report scripts still works.
  • At the 60s update interval ESPHome leaves seconds off, so uptime under a minute reads 0m. Battery devices that sleep right after reporting will usually show 0m.

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

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Updates
    • Updated the reported firmware version to 26.9.29.1.
    • Uptime is now displayed as a text value with a space-separated format, replacing the previous uptime sensor presentation.

@bharvey88 bharvey88 added the breaking-change Breaking change label Sep 29, 2026
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 5d94ca75-b070-4f94-b9bb-233f794d91c9

📥 Commits

Reviewing files that changed from the base of the PR and between b414ee8 and 04bbd81.

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

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


Walkthrough

The ESPHome Core configuration updates the firmware version substitution and replaces the uptime sensor with a text sensor. The new text sensor keeps the sys_uptime ID and a 60-second update interval.

Changes

ESPHome Core Configuration

Layer / File(s) Summary
Firmware version and uptime entity
Integrations/ESPHome/Core.yaml
Updates the firmware version substitution from 26.8.27.1 to 26.9.29.1. Replaces the uptime sensor with a text sensor using the sys_uptime ID, a 60-second update interval, and a space separator.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Feature

Suggested reviewers: bunton33

Merge Risk: ⚪ Minimal · up to 04bbd

Uptime will be displayed as formatted text, so external automations that expect a number may need updates. No in-repository numeric consumer was found, and the existing refresh action remains valid.

Architecture Summary

Architecture risk: 🔵 Low · up to 04bbd

The change affects 1 system.

Changed systems: Integrations

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — Integrations (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in Integrations/ESPHome/Core.yaml: The firmware version substitution changes from 26.8.27.1 to 26.9.29.1.
  • observed — Modified behavior in Integrations/ESPHome/Core.yaml: The sensor platform uptime entry, named Uptime with ID sys_uptime and a 60-second update interval, is removed.
  • observed — Modified behavior in Integrations/ESPHome/Core.yaml: A text_sensor uptime entry is added with ID sys_uptime, a 60-second update interval, and a space separator for its formatted value; the existing reportAllValues script continues to update this ID.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title, "Show uptime as readable text," clearly and concisely describes the primary change from a numeric uptime sensor to a readable text sensor.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

A rabbit checks the version line,
Then swaps the uptime sensor’s sign.
Text now shows the running time,
With spaces set to make it fine.
The rabbit hops away, content.

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

@bharvey88 bharvey88 closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant