-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
Improve Mealie set mealplan service #130606
Conversation
Hey there @andrew-codechimp, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
vol.Exclusive(ATTR_RECIPE_ID, "abc"): str, | ||
vol.Exclusive(ATTR_NOTE_TITLE, "abc"): str, | ||
vol.Optional(ATTR_NOTE_TEXT): str, |
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.
Hmm, so what I want to achieve is that either recipe_id
or note_title
is set. And only if note_title
is set, note_text
is allowed.
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.
You can consider using a vol.Any(vol.Schema({…}), vol.Schema({…}))
but the error message will suck. Search key_value_schemas
as the solution that we made :)
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.
Oh wait no, that's if you validate based on the value of a key, not existence of a key. We do that too with determine_script_action
but it's a bit more hacky.
* Improve Mealie set mealplan service * Fix * Fix
Proposed change
Improve Mealie set mealplan service
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: