def activities(self, limit=1, event=None):
        """Return device activity information."""
        activities = self._activities or []

        # Filter our activity array if requested
        if event:
            activities = list(
                filter(
                    lambda activity:
                    activity[CONST.EVENT] == event, activities))

        # Return the requested number
        return activities[:limit]
Return device activity information.