-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Add new time.has_time condition #1255
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
Add new time.has_time condition #1255
Conversation
Please change this to |
OK, thanks @OttoWinter 👍 |
@OttoWinter, as requested I've updated this PR to now be |
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.
Ah sorry I think I wasn't clear enough.
There's already a method to check if time is valid/has been set in the ESPTime struct: is_valid()
(before a time has been set, the ESP will default to 1 jan 1970).
I've added a comment on what I think would be best. This way, the time components don't need to know that the has_time_
variable has been set.
@OttoWinter, thanks for the feedback, I believe this is ready for another look 🙂 🙏 |
GTM when docs added |
Thanks @glmnet, I've created esphome/esphome-docs#782 🙂 |
Description:
This PR adds the
time.has_time
condition which can be used as part of a wait_until action, e.g.Related issue (if applicable): fixes N/A
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#782
Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: