I am creating a Plugin that allows the user to select existing Devices to monitor.
To assist the user, I would like to copy the Name of the selected Device (prefixed with something to make it unique) into the Name field on the Create New Device dialog.
So, if the Device "Side Door Lock" (see image below) is chosen I'd like to copy "XXX:Side Door Lock" into the Name field on the Create New Device dialog.
I know I can update the Device in the Device listing with dev.Name = "XXX:Side Door Lock" but when the Save button is pressed the Name reverts to the Name field on the dialog.
Is it possible for my Python code to update the Name of the new device when the user selects a Device in the "Config Sensor" dialog?