-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Add YAML and discovery info export feature for MQTT device subentries #141896
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
base: dev
Are you sure you want to change the base?
Conversation
Hey there @emontnemery, @bdraco, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
1af3b60
to
d3b845f
Compare
d3b845f
to
ec41abd
Compare
}, | ||
"export": { | ||
"title": "Export MQTT device config", | ||
"description": "An export allows you set up the MQTT Device configuration via YAMl or MQTT discovery. The configuration can also be helpful for troubleshooting. The export includes the unique ID's used in the configuration. You cannot activate this configuration unless you remove the MQTT-device or change the unique id's. Removing the MQTT device subentry will also remove the device from the device registry. After removing the MQTT device subentry, it can be set up via YAML or discovery with the same unique ID's.", |
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.
It's not clear to me as a user what exactly I need to change.
Also, if I don't change it, how am I notified? Does the MQTT integration catch the duplicates, or will I get some cryptic error message about Platform mqtt does not generate unique IDs.
?
8acd353
to
9747ebc
Compare
Drafting for now to allow a repair issue to remove the subentry in case an exported item was discovered or added in YAML. |
Proposed change
Add YAML and discovery info export feature for MQTT device subentries.
Optional refactoring after implementation of: home-assistant/architecture#1215
The current implementation uses normal a normal
TextSelector
andTemplateSelector with
read_onlyflag enabled
.Suggestion is to use this as initial implemention and improve the selectors with copy buttons as soon as the frontend is ready to support this.
YAML export:

Discovery export:

This allows users to move their MQTT subentries to a YAML or discovery based setup and enables to share the active config for diagnostic purposes.
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: