-
-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
Component setup error messages with markdown #3919
Conversation
@kellerza, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob, @fabianhjr and @persandstrom to be potential reviewers. |
link: Optional[bool]=False): | ||
"""Print a persistent notification.""" | ||
_PERSISTENT_ERRORS[component] = (_PERSISTENT_ERRORS.get(component, False) | ||
or link) |
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.
- 38: W503 line break before binary operator
14f5dcf
to
8592bee
Compare
_PERSISTENT_ERRORS[component] = _PERSISTENT_ERRORS.get(component) or link | ||
_lst = [HA_COMPONENT_URL.format(name) if link else name | ||
for name, link in _PERSISTENT_ERRORS.items()] | ||
message = ('The following components and platforms could not be set up:\n' |
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.
If we're using markdown, why not use list syntax for better readability.
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.
Another tip: add a link at the end to /dev-info
so they can see the validation errors.
[See validation errors](/dev-info)
This is ok to merge when the Polymer support has been merged and comments addressed 👍 |
@kellerza |
0931512
to
434466d
Compare
Comments addressed. Unfortunately I can't successfully test it yet. Feedback on gitter... |
434466d
to
59dc197
Compare
59dc197
to
b47b302
Compare
For now I have removed the relative |
Description:
This is an improvement on #3738 to log
persistent_notification
error messages in more locations in bootstrap and include markdown.The messages have been simplified to only show a single card, instead of the original two cards. If a platform or component exist a link will be added to the home-assistant.io website.
Markdown support
@balloob should I clean up the
_PERSISTENT_ERRORS
var onHOME_ASSISTANT_START
?CC: @justweb1
Related issue (if applicable): fixes #
Checklist:
If the code does not interact with devices:
tox
run successfully. Your PR cannot be merged unless tests pass