-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Update time is_valid() documentation to reflect actual logic #6051
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
base: current
Are you sure you want to change the base?
Conversation
check is not just 1970-01-01, it is 2019-01-01 or onwards per https://api-docs.esphome.io/time_8h_source#l00073
WalkthroughDocumentation correction to the time component's Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
content/components/time/_index.md (1)
261-273:⚠️ Potential issue | 🟡 MinorUpdate the
.yearexample to a 2019+ value to align with the.is_valid()threshold.The table shows a
.yearexample of 2018 while the.is_valid()description states it checks for "year 2019 or newer." This creates confusion—the example year would fail the validity check described in the same table. Update the.yearexample to 2019 or later to maintain consistency.
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
New text looks good: https://deploy-preview-6051--esphome.netlify.app/components/time/ Basic check if the time is valid (i.e. year 2019 or newer) --I don't understand what @coderabbitai is on about but if it helps maintainers ok and thanks for all your hard work. |
|
Tip For best results, initiate chat on the files or code changes.
Your fix addresses a real documentation discrepancy and will help users understand what |
check is not just 1970-01-01, it is 2019-01-01 or onwards per https://api-docs.esphome.io/time_8h_source#l00073
Description:
Related issue : fixes #6050
Pull request in esphome with YAML changes (if applicable):
Checklist:
I am merging into
nextbecause this is new documentation that has a matching pull-request in esphome as linked above.or
I am merging into
currentbecause this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.Link added in
/components/_index.mdwhen creating new documents for new components or cookbook.