and I want to develop a new integration , use HACS to install it now. and try to migrate from an old domain user device/configs to my new domain name, as old domain not maintainer anymore, no any new feature and no any support now.
and i don’t want to use the old domain name, as there is more feature changes, and can support more devices, I just want to save and migrate exist old user data and history.
so i want to add migrate solution to process old device configs(old domain name) with new domain name using config_flow.py.
this old integration saved all the device configs with json file in /configs/.storage/<old_domain_name>/device_id.json
this is simple for me to check and migrate it to new domain in async_step_user() in config_flow.py
I have finished it now, but how to migrate the old history and the remain datas? I’m not sure now, not found any useful document about it.
for example ,some sensor history data, maybe in homeassiant database with sqllite3 or any suppored DB format? I’m not sure.
any idea for this migrate process? need help, thanks!
Main question for me would be: is it worth going through all the trouble of developing and testing this? This is a one-off migration, why not let the user set-it up again?
if you have more than 10-20 devices, setup again is a bad option.
if it possible, why not doing it via code ?
in fact, I have finished most of the device configs migrate, as it’s a lots of json config file, , it’s not a very comlex job, it can be finished it less than 100 lines.
i just want to check with history data and the remains I can continue doing .
If that is typical yes, understand … still, I am more of the lazy type and would just manually change it in the .storage where possible…100lin of code seems still a lot for me
Were you successful with this task?
Mind sharing a link to your code? as I am looking into something similar and it might be very helpful to see what you have done