async def get_device_info(self, custom_attributes=None):
        """Get the local installed version."""
        await self.get_geofences()
        await self.get_devices()
        await self.get_positions()
        devinfo = {}
        try:  # pylint: disable=too-many-nested-blocks
            for dev in self._devices or []:
                for pos in self._positions or []:
                    if pos["deviceId"] == dev.get("id"):
                        uid = dev.get("uniqueId")
                        devinfo[uid] = {}
                        nested = pos.get("attributes", {})

                        for attribute in ATTRIBUTES["position"]:
                            key = ATTRIBUTES["position"][attribute]
                            devinfo[uid][attribute] = pos[key]

                        for attribute in ATTRIBUTES["device"]:
                            key = ATTRIBUTES["device"][attribute]
                            devinfo[uid][attribute] = dev[key]

                        devinfo[uid]["battery"] = nested.get("batteryLevel")
                        devinfo[uid]["motion"] = nested.get("motion")

                        if custom_attributes is not None:
                            for attr in custom_attributes:
                                if attr in nested:
                                    attrvalue = nested.get(attr)
                                    devinfo[uid][attr] = attrvalue
                        try:
                            geofence = self.geofences[dev["geofenceIds"][0]]
                        except IndexError:
                            geofence = None

                        devinfo[uid]["geofence"] = geofence
            if devinfo:
                self._device_info = devinfo
            else:
                self._device_info = self._device_info
            _LOGGER.debug(self._device_info)
        except KeyError as error:
            _LOGGER.error("Error combining data from Traccar, %s", error)
Get the local installed version.