Skip to content

Add SensorDeviceClass.UPTIME documentation#3032

Open
chemelli74 wants to merge 2 commits intohome-assistant:masterfrom
chemelli74:chemelli74-uptime-docs
Open

Add SensorDeviceClass.UPTIME documentation#3032
chemelli74 wants to merge 2 commits intohome-assistant:masterfrom
chemelli74:chemelli74-uptime-docs

Conversation

@chemelli74
Copy link
Copy Markdown
Contributor

@chemelli74 chemelli74 commented Apr 5, 2026

Proposed change

Add details for the new device class SensorDeviceClass.UPTIME

Type of change

  • Document existing features within Home Assistant
  • Document new or changing features for which there is an existing pull request elsewhere
  • Spelling or grammatical corrections, or rewording for improved clarity
  • Changes to the backend of this documentation
  • Remove stale or deprecated documentation

Checklist

  • I have read and followed the documentation guidelines.
  • I have verified that my changes render correctly in the documentation.

Additional information

Summary by CodeRabbit

  • Documentation
    • Added the UPTIME sensor device class to document the device boot timestamp; native value must be a timezone-aware datetime or None.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 07a31644-c809-42df-a501-e6eb7c98d21f

📥 Commits

Reviewing files that changed from the base of the PR and between 00914cc and 9dfa4de.

📒 Files selected for processing (1)
  • docs/core/entity/sensor.md
✅ Files skipped from review due to trivial changes (1)
  • docs/core/entity/sensor.md

📝 Walkthrough

Walkthrough

Added SensorDeviceClass.UPTIME to the sensor entity documentation as an available device class representing device boot time; native_value must be a timezone-aware datetime.datetime or None.

Changes

Cohort / File(s) Summary
Documentation
docs/core/entity/sensor.md
Inserted SensorDeviceClass.UPTIME row into "Available device classes" table. No supported units listed; description states it represents device boot timestamp and requires native_value to be a timezone-aware datetime.datetime or None.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding documentation for the new SensorDeviceClass.UPTIME device class.
Description check ✅ Passed The description follows the template structure with all required sections completed, including a clear proposed change, appropriate type of change selected, checklist items verified, and relevant links provided.
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

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
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds documentation for the newly introduced SensorDeviceClass.UPTIME in the sensor entity device class table, aligning developer docs with the corresponding Home Assistant Core change.

Changes:

  • Document SensorDeviceClass.UPTIME in the “Available device classes” table.
  • Describe the intended meaning of the new device class (uptime / last boot time).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/core/entity/sensor.md Outdated
Copy link
Copy Markdown
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.

🧹 Nitpick comments (1)
docs/core/entity/sensor.md (1)

85-85: Polish wording for grammar and consistency.

Nice addition. The sentence should be grammatically corrected (RepresentRepresents) and can be phrased to match nearby device class descriptions.

Proposed wording tweak
-| `SensorDeviceClass.UPTIME` | | Timestamp. Represent datetime of last boot of the device.
+| `SensorDeviceClass.UPTIME` | | Timestamp. Represents the datetime of the device's last boot.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/core/entity/sensor.md` at line 85, Fix the grammar and match surrounding
device class wording for SensorDeviceClass.UPTIME by changing "Represent
datetime of last boot of the device." to a clear, consistent phrase such as
"Represents the datetime of the device's last boot." or "Represents the datetime
when the device last booted." Update the sentence to use "Represents" and the
possessive form to align with nearby device class descriptions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/core/entity/sensor.md`:
- Line 85: Fix the grammar and match surrounding device class wording for
SensorDeviceClass.UPTIME by changing "Represent datetime of last boot of the
device." to a clear, consistent phrase such as "Represents the datetime of the
device's last boot." or "Represents the datetime when the device last booted."
Update the sentence to use "Represents" and the possessive form to align with
nearby device class descriptions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 54fbfe1d-11f0-45d2-a349-0f74964138f8

📥 Commits

Reviewing files that changed from the base of the PR and between bdf53bc and 00914cc.

📒 Files selected for processing (1)
  • docs/core/entity/sensor.md

Copy link
Copy Markdown
Member

@abmantis abmantis left a comment

Choose a reason for hiding this comment

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

Can be merged when the core PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants