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
Error importing config platform mqtt: cannot import name 'CONF_DISCOVERY_PREFIX' from 'homeassistant.components.mqtt.const' #72985
Error importing config platform mqtt: cannot import name 'CONF_DISCOVERY_PREFIX' from 'homeassistant.components.mqtt.const' #72985
Comments
mqtt documentation |
Hey there @emontnemery, mind taking a look at this issue as it has been labeled with an integration ( |
Same here. However if you restart Home Assistant anyway via Systemd or what have you, it starts fine without any errors. |
Thanks Pascal for your input on this! Yes, same here, I can confirm that ignoring the config warning and forcing a restart of HA via systemd worked just fine. Hi @emontnemery I feel there's something wrong here. However, given that there's a workaround, feel free to close the issue if you won't address this. Thanks, |
@LeoCal This should get a proper fix even though there is a workaround of sorts |
I am not able to reproduce the bug. Can you give a detailed step-by-step description of what you do to provoke the error? After the forced restart, does checking the config still give the same error? |
Run a Home Assistant 2022.6.0 instance with the MQTT integration. While it is running upgrade to 2022.6.1. Afterwards check the configuration file in the running instance. The key here is updating while Home Assistant is running. I am not even sure if that is supported, but it keeps downtime to a minimum, which is why I do it that way. After 2022.6.1 is installed and started, there are no problems. Only when 2022.6.0 is started but the 2022.6.1 files are already in place. |
Hello,
Here’s how to repro:
1. Install HA core 2022.6.0 (in python env) and start it
2. Update HA core to 2022.6.1
3. Check config from HA settings
The error message will pop up.
Cheers,
Leo
… Il giorno 8 giu 2022, alle ore 21:25, Erik Montnemery ***@***.***> ha scritto:
I am not able to reproduce the bug. Can you give a detailed step-by-step description of what you do to provoke the error? After the forced restart, does checking the config still give the same error?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
I believe that should work (well, at least it has always worked for me so far). That’s a fair point though: not sure if they assume hass is not running when you launch it with --script check_config. |
Home Assistant loads Python modules on demand which means the installation instructions are wrong: the Home Assistant service must be stopped before running pip to do the upgrade, otherwise behavior after running pip to do the upgrade is undefined until Home Assistant is restarted. This PR changes the instructions: home-assistant/home-assistant.io#23058 I think we can close this issue. |
Sounds good, thanks a lot for the clarification. |
The problem
Hi,
I’ve just updated from HA 2022.6.0 to 2022.6.1 and I get an error when checking the config before restarting with the new version:
Looking at the GIT diff of commits in 2022.6.1, the one that seems to be removing "CONF_DISCOVERY_PREFIX" might be:
Move MQTT config schemas and client to separate modules
What version of Home Assistant Core has the issue?
core-2022.6.1
What was the last working version of Home Assistant Core?
core-2022.6.0
What type of installation are you running?
Home Assistant Core
Integration causing the issue
MQTT
Link to integration documentation on our website
https://www.home-assistant.io/integrations/mqtt
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: