-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Add Recorder's get_statistics action docs #39492
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
Conversation
It seems that this PR is targeted against an incorrect branch since it has a parent PR on one of our codebases. Documentation that needs to be updated for an upcoming release should target the |
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughA new action, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Recorder Integration
User->>Recorder Integration: Call recorder.get_statistics(statistic_ids, start_time, end_time, period, types, units)
Recorder Integration-->>User: Return requested historical statistics data
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
source/_integrations/recorder.markdown (4)
258-259
: Expand description to include all statistic types
The overview currently mentions “mean, min, max, or sum” but thetypes
parameter also supportschange
,last_reset
, andstate
. Listing all supported types here will help users understand their options.
262-264
: Document expected time format
Thestart_time
andend_time
fields accept datetime strings. Please specify the expected format (e.g., ISO 8601:YYYY-MM-DDThh:mm:ssZ
) to prevent parsing errors.
269-269
: Standardize example heading
Other actions use headings like “#### Example usage” or “#### Example automation …”. Consider renaming “#### Example using get_statistics” to “#### Example usage” or “#### Example automation for get_statistics” for consistency.
286-286
: Adjust example YAML indentation
In the snippet,response_variable
is unindented. To align withdata
, indent it under the action block:action: recorder.get_statistics data: ... -response_variable: consumption_stats + response_variable: consumption_stats
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
source/_integrations/recorder.markdown
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Redirect rules - home-assistant-docs
- GitHub Check: Header rules - home-assistant-docs
- GitHub Check: Pages changed - home-assistant-docs
🔇 Additional comments (1)
source/_integrations/recorder.markdown (1)
256-256
: Confirm service naming matches core implementation
Ensure that the documented actionrecorder.get_statistics
aligns exactly with the service name registered in the Recorder integration (PR 142602). Discrepancies will lead to broken automations.
Thanks @MartinHjelmare ! |
Proposed change
Add missing docs for home-assistant/core#142602
This replaces #39480 since that was targeted to
next
and did not made it in time.Type of change
current
branch).current
branch).next
branch).next
branch).Additional information
Checklist
current
branch.next
branch.Summary by CodeRabbit