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 persistent notifications to bootstrap #3738
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. |
', '.join(list(_PERSISTENT_PLATFORMS)) + | ||
'(please check your configuration)') | ||
persistent_notification.create( | ||
hass, message, 'Invalid platforms', 'platform_errors') |
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.
By passing in an id
you will overwrite the previous message with that id.
', '.join(list(_PERSISTENT_VALIDATION)) + | ||
' (please check your configuration)') | ||
persistent_notification.create( | ||
hass, message, 'Invalid config', 'invalid_config') |
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.
By passing in an id
you will overwrite the previous message with that id.
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.
Instead of adding many cards with one error each, the messages lists them. There will be 2 type of messages:
Invalid platforms
Unable to find the following platforms: sensor.forecast, sensor.loch_ness_monster (please check your configuration)
Invalid config
The following platforms_components_ contain invalid configuration: sensor, light (please check your configuration)
You are right, I did not see the sets. Not a big fan of dirty globals but it is ok for now. |
🐬 |
Description:
#3555 - During startup of Home Assistant, if we experience a configuration validation error, capture the message and add it as a persistent notification. That way the user will be notified in the UI that not all components initialized.
Related issue (if applicable): fixes #
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#
Example entry for
configuration.yaml
(if applicable):Checklist:
If the code does not interact with devices:
tox
run successfully. Your PR cannot be merged unless tests pass