The « Update » button on the device should serve this purpose. Since we control the external-id and the selector, it should be simple to « hook » existing functionalities
As for MQTT, it would be enough to delete the existing consumptions/costs and recreate them.