Set devices as hash (Added the possibility to merge)