Update derivative docs for a new total_increasing handling#33152
Update derivative docs for a new total_increasing handling#33152frenck merged 3 commits intohome-assistant:nextfrom
Conversation
WalkthroughWalkthroughThe updates to Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Sensor
participant Derivative Integration
User->>+Derivative Integration: Configure `ignore_negative_derivative`
Derivative Integration-->>-User: Acknowledgement
User->>+Sensor: Get readings
Sensor-->>-User: Sensor Data
User->>+Derivative Integration: Provide sensor data
Derivative Integration->>+Sensor: Check for `total_increasing` state class
Sensor-->>-Derivative Integration: State class verified
Derivative Integration-->>Derivative Integration: Compute derivative
alt negative derivative ignored
Derivative Integration-->>Derivative Integration: Ignore negative values
end
alt round value configured
Derivative Integration-->Derivative Integration: Round the result
end
Derivative Integration-->>-User: Computed derivative value
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Additional context usedLanguageTool
Additional comments not posted (4)
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
to increase clarity of which negative I mean in case in the future we want a ignore_negative_value...
this integration now supports handling total_increasing state class.
There was a problem hiding this comment.
Actionable comments posted: 0
Outside diff range comments (10)
source/_integrations/derivative.markdown (10)
Line range hint
62-62: Capitalize the first letter of the sentence.The sentence should start with an uppercase letter.
- required: false + Required: false
Line range hint
67-67: Capitalize the first letter of the sentence.The sentence should start with an uppercase letter.
- required: false + Required: false
Line range hint
72-72: Capitalize the first letter of the sentence.The sentence should start with an uppercase letter.
- required: false + Required: false
Line range hint
77-77: Capitalize the first letter of the sentence.The sentence should start with an uppercase letter.
- required: false + Required: false
Line range hint
81-81: Use 'automatically-set' instead of 'automatically set'.Use the correct adjective form.
- the automatically set **unit_of_measurement** as explained above. + the automatically-set **unit_of_measurement** as explained above.
Line range hint
82-82: Capitalize the first letter of the sentence.The sentence should start with an uppercase letter.
- required: false + Required: false
Line range hint
85-85: Add a comma after "By default".Missing comma after "By default" for grammatical correctness.
- By default the derivative is calculated between two consecutive updates without any smoothing. + By default, the derivative is calculated between two consecutive updates without any smoothing.
Line range hint
86-86: Capitalize the first letter of the sentence.The sentence should start with an uppercase letter.
- default: 0 + Default: 0
Line range hint
95-95: Consider a shorter alternative to avoid wordiness.Consider simplifying the phrase "In order to" to "To".
- In order to capture this, you should use a `time_window` + To capture this, you should use a `time_window`
Line range hint
96-96: Fix the verb agreement.The verb form is incorrect. Use "don't" instead of "doesn't".
- the derivatives doesn't vanish to zero. + the derivatives don't vanish to zero.
Proposed change
home-assistant/core#119141
I'm adding a new "Ignore negative derivative" setting to the derivative sensor.I updated the derivative integration so that it now handles
total_increasingsensor correctly. So this PR updates the relevant paragraph for that.I also removed the link to utility meter sensor because it doesn't solve the original issue.
Type of change
currentbranch).currentbranch).nextbranch).nextbranch).Additional information
Checklist
I made a change to the existing documentation and used thecurrentbranch.nextbranch.Summary by CodeRabbit
Ignore negative derivativewith a description and default value.