-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
Fix mqtt config validation error handling #103210
Conversation
Hey there @emontnemery, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
37efe11
to
69b0ee4
Compare
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.
LGTM, thanks @jbouwh
This broke mqtt: #103414 this extended the config entity check to binary sensors, which have not been fixed upstream in mqtt. |
#101471 does not check binary_senors domain (to be complete it probably should). But for mqtt a check was added here for binary sensors. |
Right, did not realize that. To be consequent we should handle |
May be we should just allow the setting for a couple of months and raise an issue? |
Proposed change
When an invalid yaml config is found, this no longer fails mqtt starting up. This PR fixes some cases where processing an invalid config, and fails logging a correct error message.
This PR fixes correct logging an invalid config in case:
ValueError
was raised during config validation, causing not to log the by the caller intended error message.config
with an invalidentity_category
forsensor
orbinary_sensor
was used in a configuration. These validation issues were caused by Add check that sensors don't have EntityCategory.CONFIG set #101471Type of change
Additional information
Checklist
black --fast 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
..coveragerc
.To help with the load of incoming pull requests: