@k1m: Have a look at /tmp/DeviceList.xml. A few things you should be aware of:
1) This file has a backup on a protected partition, so any manual changes may (possibly will) be reset on a reboot.
2) Every device has an ID, this is an attribute (Example: <Device ID="3">). Devices are ordered using this.
3) Changing the ID will (Definitely will) break the rules created before the ID change. The ID is a primary key for the sensors DB.
4) After changing the IDs, remember to "killall haserver;killall cloudha" on the console.
5) I'm sharing this information in the spirit of the community/hackability, the disclaimer reads that this may break some stuff so be wary. If something goes wrong, the only way to recover the device may be to reset the home automation subsystem (via the LCD) and add all your devices again manually.
Hope that helps,
Devesh